Package taxlist version 0.2.4
Description
检索所查询分类单元概念的所有子概念或父概念。
Usage
get_children(taxlist, ...)
## S3 method for class 'taxlist'
get_children(taxlist, ConceptID, ...)
get_parents(taxlist, ...)
## S3 method for class 'taxlist'
get_parents(taxlist, ConceptID, ...)
Arguments
参数【taxlist】:一个 taxlist 对象。
参数【...】:方法之间传递的进一步参数。
参数【ConcertID】:用于选择父或子或分类表子集的概念id。
Details
该方法生成 taxlist 对象的子集,包括所查询分类单元概念的所有子或父级概念。
在这些方法中可以查询多个概念。
参数【ConceptID】可以是一个概念ID的向量,或是一个输入的 taxlist 对象的子集。
Value
一个 taxlist 对象,包含所请求的概念以及父子级。
Examples
准备一个科级子集:
Ebenaceae <- subset(x = Easplist, subset = TaxonName == "Ebenaceae")
Ebenaceae
object size: 6.7 Kb validation of 'taxlist' object: TRUE number of taxon usage names: 1 number of taxon concepts: 1 trait entries: 0 number of trait variables: 1 taxon views: 3 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: 0 number of concepts in level complex: 0 number of concepts in level genus: 0 number of concepts in level family: 1
根据子集,去检索子概念:
Ebenaceae <- get_children(Easplist, Ebenaceae)
Ebenaceae
object size: 8.5 Kb validation of 'taxlist' object: TRUE number of taxon usage names: 10 number of taxon concepts: 9 trait entries: 0 number of trait variables: 1 taxon views: 3 concepts with parents: 8 concepts with children: 3 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: 6 number of concepts in level complex: 0 number of concepts in level genus: 2 number of concepts in level family: 1
再准备一个种级子集:
Diostri <- subset(x = Easplist, subset = TaxonConceptID == 52403,
slot = "relations")
Diostri
object size: 6.7 Kb validation of 'taxlist' object: TRUE number of taxon usage names: 1 number of taxon concepts: 1 trait entries: 0 number of trait variables: 1 taxon views: 3 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: 1 number of concepts in level complex: 0 number of concepts in level genus: 0 number of concepts in level family: 0
随即查找它的父概念:
Diostri <- get_parents(Easplist, Diostri)
Diostri
object size: 7.1 Kb validation of 'taxlist' object: TRUE number of taxon usage names: 3 number of taxon concepts: 3 trait entries: 0 number of trait variables: 1 taxon views: 3 concepts with parents: 2 concepts with children: 2 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: 1 number of concepts in level complex: 0 number of concepts in level genus: 1 number of concepts in level family: 1