Learn R Programming

phyloregion (version 2.1.0)

tpd_alpha: Functional alpha diversity using trait probability densities

Description

tpd_alpha computes functional richness, evenness and redundancy of each grid cell from the trait probability density (TPD) of its species, for any mix of continuous and categorical traits.

Usage

tpd_alpha(x, trait, ...)

Value

A data frame with one row per grid cell: SR (species richness), FRic (volume of trait space occupied), FEve

(evenness of the TPD), FRed (functional redundancy), community weighted means of each continuous trait (CWM_) and the share of each category (share_).

Arguments

x

an object of class Matrix or matrix, where rows are grid cells and columns are species.

trait

A data frame with the first column labeled “species” and the remaining columns containing continuous (numeric) and/or categorical (character or factor) functional traits.

...

Further arguments passed to the internal TPD builder: bins (marks per trait axis, default 50), bw (kernel width per standardized trait axis, default bw.nrd0), quantile (share of each species' density kept, default 0.99, so that thin tails do not count as occupied trait space), max.axes and max.groups (with more continuous traits or more combinations of categories than these, default 3 and 8, all traits are summarized by k = 2 mixed-PCA axes).

Details

Continuous traits are standardized to mean 0 and standard deviation 1, so transform skewed traits (e.g. log) beforehand. Each combination of categorical traits gets its own trait space, so density never spreads between categories.

References

Carmona, C.P., de Bello, F., Mason, N.W.H. & Leps, J. (2016) Traits without borders: integrating functional diversity across scales. Trends in Ecology & Evolution 31: 382--394.

Carmona, C.P., Tamme, R., Partel, M. et al. (2021) Erosion of global functional diversity across the tree of life. Science Advances 7: eabf2675.

See Also

tpd_beta, PD

Examples

Run this code
data(africa)
tr <- data.frame(species = africa$trait$species,
                 height = log10(africa$trait$h_max),
                 habit = africa$trait$habit)
fa <- tpd_alpha(africa$comm, tr)
head(fa)

Run the code above in your browser using DataLab