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 
相关推荐
Yeauty1 分钟前
渲染成图再 CLI 拼接,还是进程内直推?Rust 帧到视频的两条路
开发语言·rust·音视频
geovindu32 分钟前
CSharp: Breadth First Search Algorithm and Depth First Search Algorithm
开发语言·后端·算法·c#·.net·搜索算法
库克克1 小时前
【C++】set 与multiset
开发语言·c++
Wang's Blog1 小时前
Go-Zero项目开发34: 微服务超时控制与重试机制实践
开发语言·微服务·golang·go-zero
2zcode2 小时前
项目文档:基于MATLAB神经网络的心力衰竭预测与临床辅助决策系统研究
开发语言·神经网络·matlab·心力衰竭预测\
减瓦3 小时前
深入 Quarkus:云原生时代 Java 的重生之路
java·开发语言·云原生
杨运交3 小时前
[053][核心模块]Java枚举缓存与ORM集成实践
java·开发语言·缓存
2401_894915533 小时前
Geo优化系统源码部署搭建技术——PHP程序开发部署指南
开发语言·php
wuyk5554 小时前
67.嵌入式C语言进阶:结构体指针实战指南——STM32外设、传感器数据访问的高效技巧
c语言·开发语言·stm32·单片机
找磁材4 小时前
空心杯电机与永磁体
开发语言·磁性材料·钕铁硼·磁钢