R语言【taxlist】——subset():取taxlist对象的子集

Package taxlist version 0.2.4


Description

taxlist对象的子集将通过逻辑操作或模式匹配来完成。子集可以引用包含在插槽taxonNames、taxonRelations或taxonTraits中的信息。


Usage

R 复制代码
## S4 method for signature 'taxlist'
subset(
  x,
  subset,
  slot = "names",
  keep_children = FALSE,
  keep_parents = FALSE,
  ...
)

Arguments

参数【x】:taxlist 对象。

参数【subset】:以逻辑向量或逻辑操作来实现子集。

参数【slot】:字符值,指示应用于子集的slot。

参数【keep_children】:逻辑值,是否保留子类群。

参数【keep_parents】:逻辑值,是否保留父类群。

参数【...】:传递给其他方法或从其他方法传递的进一步参数。


Details

参数【subset】将应用于参数slot中指定的slot。这个参数也允许部分匹配。

参数keep_children和keep_parents应用于对象,包括父子关系。当这些参数设置为FALSE(默认值)时,所选分类单元概念的子概念或父概念将不包括在子集中。

请注意,在函数定义内部,subset()不能正常工作。


Example

R 复制代码
sp_list <- subset(x = Easplist, subset = life_form == "reed_plant",
    slot = "taxonTraits", keep_parents = TRUE)

sp_list
复制代码
object size: 22.3 Kb 
validation of 'taxlist' object: TRUE 

number of taxon usage names: 100 
number of taxon concepts: 27 
trait entries: 14 
number of trait variables: 1 
taxon views: 3 

concepts with parents: 24 
concepts with children: 13 

hierarchical levels: form < variety < subspecies < species < complex < genus < family 
number of concepts in level form: 0
number of concepts in level variety: 0
number of concepts in level subspecies: 0
number of concepts in level species: 14
number of concepts in level complex: 0
number of concepts in level genus: 10
number of concepts in level family: 3
R 复制代码
summary(as.factor(sp_list$life_form))
复制代码
reed_plant       NA's 
        14         13 
相关推荐
郑州光合科技余经理9 天前
代码展示:PHP搭建海外版外卖系统源码解析
java·开发语言·前端·后端·系统架构·uni-app·php
feifeigo1239 天前
matlab画图工具
开发语言·matlab
dustcell.9 天前
haproxy七层代理
java·开发语言·前端
norlan_jame9 天前
C-PHY与D-PHY差异
c语言·开发语言
多恩Stone9 天前
【C++入门扫盲1】C++ 与 Python:类型、编译器/解释器与 CPU 的关系
开发语言·c++·人工智能·python·算法·3d·aigc
QQ4022054969 天前
Python+django+vue3预制菜半成品配菜平台
开发语言·python·django
遥遥江上月9 天前
Node.js + Stagehand + Python 部署
开发语言·python·node.js
m0_531237179 天前
C语言-数组练习进阶
c语言·开发语言·算法
Railshiqian9 天前
给android源码下的模拟器添加两个后排屏的修改
android·开发语言·javascript
雪人不是菜鸡9 天前
简单工厂模式
开发语言·算法·c#