Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

as.taxo

Taxonomy


Description

The function as.taxo creates an object of class taxo that is a sub-class of data.frame. Each column of the data frame must be a factor corresponding to a level j of the taxonomy (genus, family, ...). The levels of factor j define some classes that must be completly included in classes of factor j+1.
A factor with exactly one level is not allowed. A factor with exactly one individual in each level is not allowed. The function dist.taxo compute taxonomic distances.

Usage

as.taxo(df)
dist.taxo(taxo)

Arguments

df

a data frame

taxo

a data frame of class taxo

Value

as.taxo returns a data frame of class taxo. dist.taxo returns a numeric of class dist.

Author(s)

Daniel Chessel
Sébastien Ollier sebastien.ollier@u-psud.fr

See Also

taxo2phylog to transform an object of class taxo into an object of class phylog

Examples

data(taxo.eg)
tax <- as.taxo(taxo.eg[[1]])
tax.phy <- taxo2phylog(as.taxo(taxo.eg[[1]]),add.tools=TRUE)
par(mfrow = c(1,2))
plot(tax.phy, clabel.l = 1.25, clabel.n = 1.25, f = 0.75)
plot(taxo2phylog(as.taxo(taxo.eg[[1]][sample(15),])),
 clabel.l = 1.25, clabel.n = 1.25, f = 0.75)
par(mfrow = c(1,1))
all(dist.taxo(tax)==tax.phy$Wdist)

ade4

Analysis of Ecological Data: Exploratory and Euclidean Methods in Environmental Sciences

v1.7-16
GPL (>= 2)
Authors
Stéphane Dray <stephane.dray@univ-lyon1.fr>, Anne-Béatrice Dufour <anne-beatrice.dufour@univ-lyon1.fr>, and Jean Thioulouse <jean.thioulouse@univ-lyon1.fr>, with contributions from Thibaut Jombart, Sandrine Pavoine, Jean R. Lobry, Sébastien Ollier, Daniel Borcard, Pierre Legendre, Stéphanie Bougeard and Aurélie Siberchicot. Based on earlier work by Daniel Chessel.
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.