distinctiveness_com {funrar} | R Documentation |
Functional Distinctiveness for a single community
Description
Given a stacked data.frame and a distance matrix compute the functional
distinctiveness for a single community. Functional distinctiveness relates to
the functional "originality" of a species in a community. The closer to 1 the
more the species is functionally distinct from the rest of the community. See
distinctiveness()
function or the functional rarity
indices vignette included in the package
(type vignette("rarity_indices", package = "funrar")
), for more details
on the metric. IMPORTANT NOTE: in order to get functional rarity indices
between 0 and 1, the distance metric has to be scaled between 0 and 1.
Usage
distinctiveness_com(
com_df,
sp_col,
abund = NULL,
dist_matrix,
relative = FALSE
)
Arguments
com_df |
a stacked (= tidy) data.frame from a single community with each row representing a species in a community |
sp_col |
a character vector, the name of the species column in |
abund |
a character vector, the name of the column containing relative abundances values |
dist_matrix |
a functional distance matrix as given by
|
relative |
a logical indicating if distinctiveness should be scaled relatively to the community (scaled by max functional distance among the species of the targeted community) |
Value
the same data.frame with the additional Di column giving functional distinctiveness values for each species
Caution
This function is meant for internal uses mostly, thus it does not include any
tests on inputs and may fail unexpectedly. Please use
distinctiveness_stack()
to avoid input errors.
See Also
scarcity_com()
,
vignette("rarity_indices", package = "funrar")
and
distinctiveness()
Details section for detail on the index