From a trait table and a site-species matrix compute Uniqueness (nearest functional distance) for each species and each trait, plus computes it for all the traits.
uniqueness_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 data.frame containing species' names and their uniqueness values for each traits (Ui_X column for trait X), as well as a column for the uniqueness value for all traits (Ui_all column)
distinctiveness_dimensions()
, uniqueness()
, uniqueness_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")]
ui_dim = uniqueness_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.