Computes scarcity from a relative abundance matrix of species. Scarcity is
close to 1 when a species is rare in a community and close to 0 when it is
abundant. It requires a site-species matrix with relative abundances. See
Details
section for the formula. The sites-species matrix should have
sites in rows and species in columns, similar to vegan
package defaults.
scarcity(pres_matrix)
a site-species matrix, with species in rows and sites in columns, containing relative abundances values
a similar matrix to pres_matrix
with scarcity values in lieu
of relative abundances.
The scarcity of species is computed as follow: $$ S_i = \exp{-N \log{2} A_i}, $$ with \(S_i\) the scarcity of species \(i\), \(N\) the total number of species in the community and \(A_i\) the relative abundance of species \(i\) in the community. Scarcity is thus a measure of the local rarity in terms of abundances. If \(S_i\) is close to 1 the species has a very low abundances while if it's close to 0, it is quite abundant in the community.
vignette("rarity_indices", package = "funrar")
for details on the
scarcity metric; distinctiveness()
, restrictedness()
, uniqueness()
data("aravo", package = "ade4")
# Site-species matrix
mat = as.matrix(aravo$spe)
mat = make_relative(mat)
si = scarcity(pres_matrix = mat)
si[1:5, 1:5]
#> Agro.rupe Alop.alpi Anth.nipp Heli.sede Aven.vers
#> AR07 NA NA NA NA NA
#> AR71 NA NA NA NA NA
#> AR26 0.231951 NA 0.6144201 NA 0.6144201
#> AR54 NA NA NA 0.3379268 NA
#> AR60 NA NA NA NA NA