R语言【taxlist】——taxon_traits(),updat_trait():操作 taxlist 对象中的 taxon 特征

Package taxlist version 0.2.4


Description

分类列表对象中的slot taxonTraits包含分类单元概念的属性(例如功能特征)。这些函数适用于分类表中性状信息的替换、检索和追加。


Usage

R 复制代码
taxon_traits(taxlist, ...)

## S3 method for class 'taxlist'
taxon_traits(taxlist, ...)

taxon_traits(taxlist, ...) <- value

## S3 replacement method for class 'taxlist'
taxon_traits(taxlist, ...) <- value

update_trait(taxlist, ...)

## S3 method for class 'taxlist'
update_trait(taxlist, taxonTraits, ...)

Arguments

参数【taxlist】:一个 taxlist 对象。

参数【...】:在方法之间传递的进一步参数。

参数【value】:要设置为槽taxonTraits的数据帧。

参数【taxonTraits】:包含要插入到"taxlist"中的分类单元特征的数据框架。列'TaxonConceptID'在这个表中是必填的。如果某些分类单元概念id没有出现在'taxlist'中,则update_trait()将检索错误消息。


Details

分类单元特征包含在分类列表对象的槽taxonTraits处的数据框架中。为了优化空间,此数据框架只包含包含信息的概念的条目,而不包含信息的分类组将从该表中跳过。因此,附加新变量可能还必须在该槽中包含新行,这是由该函数自动执行的。

替换方法 taxon_traits<- 应该只在从一个空的分类列表对象构造分类列表对象时使用。


Example

R 复制代码
head(taxon_traits(Easplist))
复制代码
  TaxonConceptID          life_form
1              7       phanerophyte
2              9       phanerophyte
3             18 facultative_annual
4             20 facultative_annual
5             21    obligate_annual
6             22        chamaephyte
R 复制代码
summary(Easplist, "Launaea cornuta")
复制代码
------------------------------ 
concept ID: 355 
view ID: 1 
level: species 
parent: 54923 Launaea Cass. 

# accepted name: 
355 Launaea cornuta (Hochst. ex Oliv. & Hiern) C. Jeffrey 

# synonyms (2): 
53821 Sonchus exauriculatus (Oliv. & Hiern) O. Hoffm. 
53843 Sonchus bipontini var. pinnatifidus Oliv. & Hiern 
------------------------------
R 复制代码
accepted_name(taxlist = Easplist, ConceptID = 355, show_traits = TRUE)
复制代码
  TaxonConceptID TaxonUsageID       TaxonName                            AuthorName ViewID
1            355          355 Launaea cornuta (Hochst. ex Oliv. & Hiern) C. Jeffrey      1
    Level     life_form
1 species tussock_plant
R 复制代码
sp_list <- update_trait(taxlist = Easplist, taxonTraits = data.frame(
        TaxonConceptID = 355,
        life_form = "annual"))
accepted_name(taxlist = sp_list, ConceptID = 355, show_traits = TRUE)
复制代码
  TaxonConceptID TaxonUsageID       TaxonName                            AuthorName ViewID
1            355          355 Launaea cornuta (Hochst. ex Oliv. & Hiern) C. Jeffrey      1
    Level life_form
1 species    annual
相关推荐
2601_9491465317 分钟前
C语言语音通知接口接入教程:如何使用C语言直接调用语音预警API
c语言·开发语言
陌上丨21 分钟前
Redis的Key和Value的设计原则有哪些?
数据库·redis·缓存
曹牧22 分钟前
Spring Boot:如何测试Java Controller中的POST请求?
java·开发语言
KYGALYX29 分钟前
服务异步通信
开发语言·后端·微服务·ruby
AI_567831 分钟前
AWS EC2新手入门:6步带你从零启动实例
大数据·数据库·人工智能·机器学习·aws
zmzb010335 分钟前
C++课后习题训练记录Day98
开发语言·c++
ccecw1 小时前
Mysql ONLY_FULL_GROUP_BY模式详解、group by非查询字段报错
数据库·mysql
JH30731 小时前
达梦数据库与MySQL的核心差异解析:从特性到实践
数据库·mysql
数据知道1 小时前
PostgreSQL 核心原理:如何利用多核 CPU 加速大数据量扫描(并行查询)
数据库·postgresql
猫头虎1 小时前
如何排查并解决项目启动时报错Error encountered while processing: java.io.IOException: closed 的问题
java·开发语言·jvm·spring boot·python·开源·maven