| tax2traits {taxlist} | R Documentation |
Set taxonomic information as taxon traits
Description
Taxonomic classification can be included in taxlist
objects within the information provided at slot taxonRelations.
Nevertheless, for statistical analyses it may be more convenient to insert
such information in the slot taxonTraits.
Usage
tax2traits(object, ...)
## S3 method for class 'taxlist'
tax2traits(object, get_names = FALSE, ...)
Arguments
object |
An object of class taxlist. |
... |
Further arguments to be passed among methods. |
get_names |
Logical value indicating whether taxon names should be retrieved instead of taxon IDs. |
Details
This function can only be applied to objects containing parent-child relationships and information on taxonomic levels.
Value
An object of class taxlist with taxonomy added as traits.
Author(s)
Miguel Alvarez kamapu78@gmail.com.
Examples
## Family Acanthaceae with children
Acanthaceae <- subset(x = Easplist, subset = TaxonName == "Acanthaceae",
slot = "names", keep_children = TRUE)
summary(Acanthaceae)
## Insert taxonomy to taxon traits
Acanthaceae <- tax2traits(Acanthaceae, get_names = TRUE)
head(taxon_traits(Acanthaceae))
[Package taxlist version 0.3.0 Index]