Learn R Programming

entropart (version 1.1.3)

ChaoPD: Phylogenetic Diversity of a Community

Description

Calculates the phylogenetic diversity of order $q$ of a probability vector.

Usage

ChaoPD(Ps, q, PhyloTree, Normalize = TRUE, CheckArguments = TRUE)

Arguments

Ps
A probability vector, summing to 1.
q
A number.
PhyloTree
An object of class hclust or phylog. The tree is not necessarily ultrametric. Computation is must faster if the tree is ph
Normalize
If TRUE (default), diversity is not affected by the height of the tree. If FALSE, it is proportional to the height of the tree.
CheckArguments
Logical; if TRUE, the function arguments are verified. Should be set to FALSE to save time when the arguments have been checked elsewhere.

Value

  • A number equal the diversity of the community.

Details

The phylogenetic diversity is calculated following Chao et al. (2010). The result is identical to the total diversity calculated by PhyloDiversity but it is much faster. A single value is returned instead of a PhyloDiversity object, and no bias correction is available. The Normalize arguments allows calculating either $^{q}\bar{D}(T)$ (if TRUE) or $^{q}PD(T)$ if FALSE. This function allows very efficient calculation when the Tree is of class phylog or PPtree (hclust trees must be converted to phylog, a slow process). Diversity can be calculated for non ultrametric trees following Chao et al. (2010) even though the meaning of the result is not so clear (Leinster and Cobold, 2011).

References

Chao, A., Chiu, C.-H. and Jost, L. (2010). Phylogenetic diversity measures based on Hill numbers. Philosophical Transactions of the Royal Society B 365(1558): 3599-609. Leinster, T. and Cobbold, C. (2011). Measuring diversity: the importance of species similarity. Ecology 93(3): 477-489.

See Also

PhyloDiversity, AllenH

Examples

Run this code
# Load Paracou data (number of trees per species in two 1-ha plot of a tropical forest
  #      and their taxonomy)
  data(Paracou618)
  # Ps is the vector of probabilities
  Ps <- Paracou618.MC$Ps
  
  # Calculate the phylogenetic Simpson diversity of the plot
  ChaoPD(Paracou618.MC$Ps, 2, Paracou618.Taxonomy, Normalize=TRUE) -> ChaoD
  ChaoD
  
  # Calculate it using PhyloDiversity: more powerful but much slower is the tree has many periods
  PhyloDiversity(Paracou618.MC$Ps, 2, Paracou618.Taxonomy, Normalize=TRUE) -> phyD
  summary(phyD)

Run the code above in your browser using DataLab