The function treeUniqueness
calculates community-level phylogenetic (or tree-based) redundancy taking into account the branching pattern of the underlying phylogenetic tree (or any other tree, like a functional dendrogram).
treeUniqueness(phyl, comm, index =
c("richness", "GiniSimpson", "Shannon"), tol = 0.001)
An object of class data.frame
is returned containing the following statistics:
the present-day diversity of all plots in the data frame.
the tree-based (phylogenetic) diversity \(D_P\) of all plots in the data frame obtained by averaging the diversities \(D_k\) over the corresponding tree periods after rescaling the tip-to-root length of the tree to unit (for details, see Ricotta et al. 2018).
tree-based (phylogenetic) uniqueness calculated as the ratio between tree-based (phylogenetic) diversity and present-day diversity \(D_P/D_K\).
tree-based (phylogenetic) redundancy, calculated as \(1-U\).
an object inheriting the class phylo
(see package ape), phylo4
(see package phylobase), or hclust
.
a data frame or a matrix typically with communities as rows, species as columns and presence/absence (1/0) or an index of abundance as entries. Species should be labeled as in the tree named phyl
where they are the tips.
a string. treeUniqueness
computes tree-based (phylogenetic) species richness ("richness") or the tree-based analogue of the Shannon (shannon) or Gini-Simpson diversity ("GiniSimpson"); "richness" is assumed as the default value.
a numeric. A value between -tol and tol is considered as zero. See details.
Ricotta et al. (2018) with modifications by Sandrine Pavoine sandrine.pavoine@mnhn.fr
The tolerance threshold tol
is particularly important if your tree is not exactly ultrametric due to approximation problems. In that case, the distance from tip to root varies according to the tip considered, although it should not (variations are due to approximation problems). A difference smaller than tol in the distance to root for two species will thus be considered as null.
Ricotta, C., Bacaro, G., Caccianiga, M., Cerabolini, B.E.L., Pavoine, S. (2018) A new method for quantifying the phylogenetic redundancy of biological communities. Oecologia, 186, 339--346.
uniqueness
if (FALSE) {
if(require(ape)){
data(rockfish)
phy <- read.tree(text = rockfish$tre)
R <- treeUniqueness(phy, rockfish$fau, index = "Shannon")
}
}
Run the code above in your browser using DataLab