R/rarity_dimensions.R
distinctiveness_dimensions.Rd
From a trait data.frame and a site-species matrix compute Distinctiveness (average pairwise functional distance) for each species in each community on each provided trait and on all traits taken altogether.
distinctiveness_dimensions(pres_matrix, traits_table, ...)
a site-species matrix, with species in rows and sites in columns, containing presence-absence, relative abundances or abundances values
a data.frame of traits with species in row and traits in columns, row names should be species names,
additional arguments supplied to compute_dist_matrix()
a list of site-species matrix with functional distinctiveness values per species per site, with elements Di_X for distinctiveness computed on trait X and Di_all for distinctiveness computed on all traits.
uniqueness_dimensions()
, distinctiveness()
,
distinctiveness_stack()
and compute_dist_matrix()
for additional
arguments
data("aravo", package = "ade4")
# Site-species matrix
mat = as.matrix(aravo$spe)
rel_mat = make_relative(mat)
# Example of trait table
tra = aravo$traits[, c("Height", "SLA", "N_mass")]
di_dim = distinctiveness_dimensions(rel_mat, tra)
#> Only numeric traits provided, consider using euclidean distance.
#> Only numeric traits provided, consider using euclidean distance.
#> Only numeric traits provided, consider using euclidean distance.
#> Only numeric traits provided, consider using euclidean distance.