View source: R/treeUniqueness.R
treeUniqueness | R Documentation |
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)
phyl |
an object inheriting the class |
comm |
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 |
index |
a string. |
tol |
a numeric. A value between -tol and tol is considered as zero. See details. |
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.
An object of class data.frame
is returned containing the following statistics:
DK |
the present-day diversity of all plots in the data frame. |
DP |
the tree-based (phylogenetic) diversity |
U |
tree-based (phylogenetic) uniqueness calculated as the ratio between tree-based (phylogenetic) diversity and present-day diversity |
R |
tree-based (phylogenetic) redundancy, calculated as |
Ricotta et al. (2018) with modifications by Sandrine Pavoine sandrine.pavoine@mnhn.fr
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
## Not run:
if(require(ape)){
data(rockfish)
phy <- read.tree(text = rockfish$tre)
R <- treeUniqueness(phy, rockfish$fau, index = "Shannon")
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.