| diversityProfileFunc | R Documentation |
Compute functional Hill numbers (Leinster & Cobbold 2012) across a continuous range of diversity orders (q), producing a functional diversity profile based on trait similarity.
diversityProfileFunc(
x,
traits,
q = seq(0, 3, by = 0.1),
type = c("both", "per_site", "regional"),
dist_method = c("euclidean", "gower"),
normalize = TRUE,
coords = NULL
)
x |
A site-by-species matrix (abundance data). Column names must match
row names in |
traits |
A data.frame of species traits. Row names must match column
names in |
q |
Numeric vector. Orders of diversity. Default |
type |
Character. What to compute: |
dist_method |
Character. Distance method for trait matrix:
|
normalize |
Logical. Normalize distances to [0, 1]? Default |
coords |
Optional data.frame with |
Functional Hill numbers (Leinster & Cobbold 2012) incorporate trait similarity via a similarity matrix Z = 1 - D. When all species are maximally dissimilar (Z = identity), this reduces to standard Hill numbers.
An object of class spacc_profile with $profile_type = "functional".
Leinster, T. & Cobbold, C.A. (2012). Measuring diversity: the importance of species similarity. Ecology, 93, 477-489.
diversityProfile() for taxonomic profiles,
diversityProfilePhylo() for phylogenetic profiles
species <- matrix(rpois(20 * 10, 2), nrow = 20,
dimnames = list(NULL, paste0("sp", 1:10)))
traits <- data.frame(
body_size = rnorm(10), diet = rnorm(10),
row.names = paste0("sp", 1:10)
)
prof <- diversityProfileFunc(species, traits)
print(prof)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.