functional_dispersion | R Documentation |
Calculates functional dispersion from a species-trait matrix and possibly an abundance vector
functional_dispersion(
x,
w,
a = rep(1, nrow(x)),
ch = F,
gower = T,
returnPartial = F
)
x |
numeric matrix. Species-trait matrix. |
w |
numeric vector. A vector of length equal to columns in 'x', which specifies the variable weights. If missing, weights are equal. |
a |
optional numeric vector. Species-abundances. |
ch |
a logical. If set to 'TRUE' use convex-hull centroid for the calculation. |
gower |
a logical. Calculate entropy based on Gower dissimilarity as opposed to euclidean distance. |
returnPartial |
an optional logical. If true the distances of each species to each center is returned along with the functional dispersion. |
a number.
This functions implements functional dispersion, as the mean distance/dissimilarity to the community weighted mean (traits).
It also supplies the option of returning the "partial" dispersions, i.e. the distance/dissimilarity of each species in each site, from that center.
It also supplies the option of calculating the center of mass based on the convex hull of the first 2 or N principal coordinates. Caution should be used, when using this option, since this deviates from the definition of functional dispersion.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.