uniqueness_stack | R Documentation |
Computes functional uniqueness values over a given regional pool. Functional
uniqueness gives the functional distance to the nearest-neighbor of a given
species in the provided distance matrix. See uniqueness()
function for
details on computation. You can either use _stack()
or _tidy()
functions
as they are aliases of one another.
uniqueness_stack(com_df, sp_col, dist_matrix) uniqueness_tidy(com_df, sp_col, dist_matrix)
com_df |
a data frame of the species in the regional pool. |
sp_col |
a character vector indicating the name of the species column
in the |
dist_matrix |
a functional distance matrix |
A data.frame with uniqueness value per species, with one column with provided species column name and the Ui column with the uniqueness values.
uniqueness()
and vignette("rarity_indices", package = "funrar")
for
details on the uniqueness metric; distinctiveness_stack()
,
restrictedness_stack()
, scarcity_stack()
data("aravo", package = "ade4") # Site-species matrix converted into data.frame mat = as.matrix(aravo$spe) dat = matrix_to_stack(mat, "value", "site", "species") dat$site = as.character(dat$site) dat$species = as.character(dat$species) # Example of trait table tra = aravo$traits[, c("Height", "SLA", "N_mass")] # Distance matrix dist_mat = compute_dist_matrix(tra) ui_df = uniqueness_stack(dat, "species", dist_mat) head(ui_df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.