taxon_names: Handle information on taxon usage names.

View source: R/taxon_names.R

taxon_namesR Documentation

Handle information on taxon usage names.

Description

The slot taxonNames in taxlist objects contains taxon usage names for the respective taxon. These functions assist on the access and modification of entries for names.

Usage

taxon_names(taxlist, ...)

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

taxon_names(taxlist, ...) <- value

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

add_synonym(taxlist, ...)

## S3 method for class 'taxlist'
add_synonym(taxlist, ConceptID, TaxonName, AuthorName, ...)

update_name(taxlist, ...)

## S3 method for class 'taxlist'
update_name(taxlist, UsageID, ...)

delete_name(taxlist, ...)

## S3 method for class 'taxlist'
delete_name(taxlist, UsageID, ...)

Arguments

taxlist

A taxlist object to be modified.

...

Further arguments passed among methods. In update_name are vectors including the variables to be updated for the respective taxon usage ID.

value

A data frame used as new slot taxonNames in taxlist.

ConceptID

Numeric vector indicating the concept ID to which the synonyms will be added.

TaxonName, AuthorName

Character values used for the new names (synonyms).

UsageID

Numeric vector indicating the taxon usage IDs to be updated.

Details

The replacement method ⁠taxon_names<-⁠ is a quick alternative to include names in empty taxlist objects.

The function add_synonym() works only for adding names to existing taxon concepts. For adding new taxon concepts as well you should use add_concept().

Value

A data frame or, in the case of the replacement method, a taxlist object with modified slot taxonNames.

Author(s)

Miguel Alvarez kamapu78@gmail.com

See Also

taxlist

Examples

## Display of slot 'taxonNames'
Euclea <- subset(x = Easplist, subset = charmatch("Euclea", TaxonName),
  slot = "names", keep_children = TRUE)
Euclea
taxon_names(Euclea)

## Insert a synonym to Diospyros scabra
summary(Easplist, "Diospyros scabra")
sp_list <- add_synonym(taxlist = Easplist, ConceptID = 51793,
  TaxonName = "Maba scabra", AuthorName = "Chiov.")
summary(sp_list, "Diospyros scabra")

## Delete a synonym of Launaea cornuta
summary(sp_list, "Launaea cornuta")
sp_list <- delete_name(sp_list, 53821)
summary(sp_list, "Launaea cornuta")

## Hypothetical correction in author name in Launaea cornuta
sp_list <- update_name(taxlist = sp_list, UsageID = 355, AuthorName = "L.")
summary(sp_list, "Launaea cornuta")

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