Learn R Programming

taxlist (version 0.2.3)

taxon_traits: Manipulation of taxon traits in taxlist objects.

Description

The slot taxonTraits in taxlist objects contains attributes of taxon concepts (e.g. functional traits). These functions are suitable for replacing, retrieving and appending trait information in taxonomic lists.

Usage

taxon_traits(taxlist, ...)

# S4 method for taxlist taxon_traits(taxlist, ...)

taxon_traits(taxlist) <- value

# S4 method for taxlist,data.frame taxon_traits(taxlist) <- value

update_trait(taxlist, ConceptID, ...)

# S4 method for taxlist,numeric update_trait(taxlist, ConceptID, ...)

Arguments

taxlist

A taxlist object.

...

Further arguments to be passed among methods.

value

Data frame to be set as slot taxonTraits.

ConceptID

A numeric vector with the respective taxon concept IDs.

Author

Miguel Alvarez kamapu78@gmail.com

Details

Taxon traits are contained in a data frame at the slot taxonTraits in taxlist objects. To optimise space, this data frame contain only entries for those concepts with information, while taxa with no information are skipped from this table. Thus appending new variables may also have to include new rows in this slot, which is automatically carried out by this function.

The replacement method taxon_traits<- should be only used when constructing taxlist objects from an empty one.

See Also

taxlist.

Examples

Run this code
head(taxon_traits(Easplist))

## Updating traits for Launaea cornuta
summary(Easplist, "Launaea cornuta")
accepted_name(taxlist = Easplist, ConceptID = 355, show_traits = TRUE)

# Update
Easplist <- update_trait(
  taxlist = Easplist, ConceptID = 355,
  life_form = "annual"
)
accepted_name(taxlist = Easplist, ConceptID = 355, show_traits = TRUE)

Run the code above in your browser using DataLab