| diversityProfilePhylo | R Documentation |
Compute phylogenetic Hill numbers (Chao et al. 2010) across a continuous range of diversity orders (q), producing a phylogenetic diversity profile.
diversityProfilePhylo(
x,
tree,
q = seq(0, 3, by = 0.1),
type = c("both", "per_site", "regional"),
coords = NULL
)
x |
A site-by-species matrix (abundance data). Column names must match tip labels in the phylogeny. |
tree |
An |
q |
Numeric vector. Orders of diversity. Default |
type |
Character. What to compute: |
coords |
Optional data.frame with |
Phylogenetic Hill numbers (Chao et al. 2010) weight branches by their evolutionary distance. At q=0 this approximates normalized Faith's PD. Higher q values increasingly emphasize common lineages.
An object of class spacc_profile with $profile_type = "phylogenetic".
Chao, A., Chiu, C.H. & Jost, L. (2010). Phylogenetic diversity measures based on Hill numbers. Philosophical Transactions of the Royal Society B, 365, 3599-3609.
diversityProfile() for taxonomic profiles,
diversityProfileFunc() for functional profiles
if (requireNamespace("ape", quietly = TRUE)) {
species <- matrix(rpois(20 * 10, 2), nrow = 20,
dimnames = list(NULL, paste0("sp", 1:10)))
tree <- ape::rcoal(10, tip.label = paste0("sp", 1:10))
prof <- diversityProfilePhylo(species, tree)
print(prof)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.