taxlist (version 0.2.4)

tax2traits: 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 taxlist tax2traits(object, get_names = FALSE, ...)

Value

An object of class taxlist with taxonomy added as traits.

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.

Author

Miguel Alvarez kamapu78@gmail.com.

Details

This function can only be applied to objects containing parent-child relationships and information on taxonomic levels.

Examples

Run this code
## 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))

Run the code above in your browser using DataLab