get_children: Retrieve children or parents of taxon concepts

View source: R/get_children.R

get_childrenR Documentation

Retrieve children or parents of taxon concepts

Description

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

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

A taxlist object.

...

Further arguments passed among methods.

ConceptID

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

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 kamapu78@gmail.com

Examples

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

Ebenaceae <- get_children(Easplist, Ebenaceae)
Ebenaceae

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

Diostri <- get_parents(Easplist, Diostri)
Diostri

kamapu/taxlist documentation built on Feb. 17, 2024, 8:27 a.m.