get_children: Retrieve Children or Parents of Taxon Concepts

Description Usage Arguments Details Value Author(s) Examples

Description

Retrieve all children or all parents of a queried taxon concept.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## S4 method for signature 'taxlist,numeric'
get_children(taxlist, ConceptID, ...)

## S4 method for signature 'taxlist,taxlist'
get_children(taxlist, ConceptID, ...)

## S4 method for signature 'taxlist,numeric'
get_parents(taxlist, ConceptID, ...)

## S4 method for signature 'taxlist,taxlist'
get_parents(taxlist, ConceptID, ...)

Arguments

taxlist

A taxlist object.

ConceptID

Concept IDs for selecting parents or children or a subset of 'taxlist'.

...

Further arguments passed among methods.

Details

This function produces subsets of taxlist objects including all children or parents of queried taxon concepts. Multiple concepts can be queried in these function. The argument 'ConceptID' can be a vector of concept IDs or a subset of the input 'taxlist' object.

Value

A taxlist object with a subset including requested concepts with children or parents.

Author(s)

Miguel Alvarez, [email protected].

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
library(taxlist)
data(Easplist)

## Subset with family Ebenaceae and children
Ebenaceae <- subset(Easplist, charmatch("Ebenaceae", TaxonName))
Ebenaceae <- get_children(Easplist, Ebenaceae)

summary(Ebenaceae)
summary(Ebenaceae, "all", maxsum=100)

## Get parents of Diospyros tricolor
Diostri <- subset(Easplist, TaxonConceptID == 52403, slot="relations")
Diostri <- get_parents(Easplist, Diostri)

summary(Diostri)
summary(Diostri, "all")

taxlist documentation built on July 2, 2018, 1:03 a.m.