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, ...)

Arguments

pres_matrix

a site-species matrix, with species in rows and sites in columns, containing presence-absence, relative abundances or abundances values

traits_table

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()

Value

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.

Examples

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.