
Retrieve or replace slot taxonRelations in taxlist objects
Source:R/taxon_relations.R, R/add_concept.R
taxon_relations.RdRetrieve 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 method for class 'taxlist'
taxon_relations(taxlist, ...) <- value
# S4 method for class 'taxlist,numeric'
update_concept(taxlist, ConceptID, ...)Arguments
- taxlist
A taxlist object.
- ...
Further arguments passed among methods.
- value
A
data.frameobject to be set as slottaxonRelations.- ConceptID
Concept IDs to be updated.
Value
An object of class taxlist with added names and concepts.
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().
Author
Miguel Alvarez kamapu78@gmail.com
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
#> object size: 7 Kb
#> validation of 'taxlist' object: TRUE
#>
#> number of taxon usage names: 3
#> number of taxon concepts: 2
#> trait entries: 0
#> number of trait variables: 1
#> taxon views: 3
#>
#> concepts with parents: 1
#> concepts with children: 1
#>
#> concepts with rank information: 2
#> concepts without rank information: 0
#>
#> family: 0
#> genus: 1
#> complex: 0
#> species: 1
#> subspecies: 0
#> variety: 0
#> form: 0
#>
#>
taxon_relations(Euclea)
#> TaxonConceptID AcceptedName Basionym Parent Level ViewID
#> 267 269 269 NA 55707 species 1
#> 3537 55707 55709 NA NA genus NA