qDT {adiv}R Documentation

Mean Diversity along a Phylogenetic Tree

Description

Function qDT calculates the ^qD(T) index developed by Chao et al. (2010) as the mean diversity of order q over T years in a phylogenetic tree. In function qDT, the index is computed over the whole tree from root to tips. It uses the formula of the ^qD(T) index extended to non-ultrametric trees (where the distance from tip to root varies) (Chao et al. 2010, equation 4.5) .

Usage

qDT(phyl, comm, q = 2, tol = 1e-08)

Arguments

phyl

an object inheriting the class phylo (see package ape), phylo4 (see package phylobase), or hclust.

comm

a data frame or a matrix typically with communities as rows, species as columns and abundance as entry. Species should be labeled as in the phylogenetic tree where they are the tips.

q

a vector with nonnegative value(s) for parameter q. See details.

tol

numeric tolerance threshold: values between -tol and tol are considered equal to zero.

Value

If only one value of q is given, a vector with the phylogenetic diversity of each community is returned. If more than one value of q is given, a list of two objects is returned:

q

the vector of values for q;

div

a data frame with the phylogenetic diversity of each community calculated for all values of q.

The results of function plot.qDT are of class "evodivparam". As such, function plot.evodivparam allows to plot the results of function qDT.

Author(s)

Sandrine Pavoine sandrine.pavoine@mnhn.fr

References

Chao, A., Chiu, C.-H., Jost, L. (2010) Phylogenetic diversity measures based on Hill numbers. Philosophical Transactions of the Royal Society London Series B, 365, 3599–3609.

See Also

evodivparam

Examples

## Not run: 
if(require(ape)){

data(batcomm)
phy <- read.tree(text=batcomm$tre)
ab <- batcomm$ab[, phy$tip.label]
plot(qDT(phy, ab))
plot(qDT(phy, ab, q=seq(0, 10, length=20)))

}

## End(Not run)

[Package adiv version 2.2.1 Index]