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 
相关推荐
碧海蓝天20226 分钟前
C++法则21:避免将#include放在命名空间内部。
开发语言·c++
兮动人13 分钟前
Java应用全链路故障排查实战指南:从系统资源到JVM深度诊断
java·开发语言·jvm
R-sz24 分钟前
导出word并且插入图片
开发语言·c#·word
CodeWithMe24 分钟前
【读书笔记】《C++ Software Design》第一章《The Art of Software Design》
开发语言·c++
脑袋大大的42 分钟前
判断当前是否为钉钉环境
开发语言·前端·javascript·钉钉·企业应用开发
Wy. Lsy1 小时前
Kotlin基础学习记录
开发语言·学习·kotlin
Tanecious.2 小时前
C++--红黑树
开发语言·c++
Top`2 小时前
Java 泛型 (Generics)
java·开发语言·windows
爱吃土豆的马铃薯ㅤㅤㅤㅤㅤㅤㅤㅤㅤ2 小时前
如何使用Java WebSocket API实现客户端和服务器端的通信?
java·开发语言·websocket
Shartin2 小时前
Can201-Introduction to Networking: Application Layer应用层
服务器·开发语言·php