tax2traits: Set Taxonomic Information as Taxon Traits

Description Usage Arguments Details Value Author(s) Examples

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

1
2
## S4 method for signature 'taxlist'
tax2traits(object, get_names=FALSE, ...)

Arguments

object

An object of class taxlist.

get_names

Logical value indicating whether taxon names should be retrieved instead of taxon IDs

...

Further arguments to be passed among methods.

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, [email protected].

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
library(taxlist)
data(Easplist)

## Family Acanthaceae with children
Easplist <- subset(Easplist, TaxonName == "Acanthaceae", slot="names",
	keep_children=TRUE)
summary(Easplist)

## Insert taxonomy to taxon traits
Easplist <- tax2traits(Easplist, get_names=TRUE)
head(taxon_traits(Easplist))

taxlist documentation built on July 2, 2018, 1:03 a.m.