taxon_relations: Retrieve or replace slot taxonRelations in taxlist objects

View source: R/taxon_relations.R

taxon_relationsR Documentation

Retrieve or replace slot taxonRelations in taxlist objects

Description

Retrieve the content of slot taxonRelations from a taxlist object or replace it by a new data frame.

Usage

taxon_relations(taxlist, ...)

## S3 method for class 'taxlist'
taxon_relations(taxlist, ...)

taxon_relations(taxlist, ...) <- value

## S3 replacement method for class 'taxlist'
taxon_relations(taxlist, ...) <- value

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

Arguments

taxlist

A taxlist object.

...

Further arguments passed among methods.

value

A data.frame object to be set as slot taxonRelations.

ConceptID

Concept IDs to be updated.

Details

The replacement method ⁠taxon_relations<-⁠ should be only used when constructing taxlist objects from an empty one (prototype).

New concepts should be first added to a taxlist object using their respective accepted names. Synonyms can be further provided using the function add_synonym().

Additional named vectors can be provided to be included in slot taxonNames, in the cases where those variables already exist, otherwise they will be ignored.

It is recommended also to provide a concept view as ViewID (see taxon_views()). For adding a new view, use add_view().

Value

An object of class taxlist with added names and concepts.

Author(s)

Miguel Alvarez kamapu78@gmail.com

See Also

taxlist

Examples

## Subset for the genus Euclea and display of slot 'taxonNames'
Euclea <- subset(x = Easplist, subset = charmatch("Euclea", TaxonName),
  slot = "names", keep_children = TRUE)
Euclea
taxon_relations(Euclea)

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