fd_fric {fundiversity} | R Documentation |
Compute Functional Richness (FRic)
Description
Functional Richness is computed as the volume of the convex hull from all
included traits following Villéger et al. (2008).
NB: FRic is equal to NA
when there are strictly less species in a site
than the number of provided traits.
Usage
fd_fric(traits, sp_com, stand = FALSE)
Arguments
traits |
Trait matrix with species as rows and traits as columns.
It has to contain exclusively numerical values. This can be
either a |
sp_com |
Site-species matrix with sites as rows and species as columns
if not provided, the function considers all species with equal
abundance in a single site. This can be either a |
stand |
a boolean indicating whether to standardize FRic values over
the observed maximum over all species (default: |
Details
By default, when loading fundiversity, the functions to
compute convex hulls are
memoised through the memoise
package if it is installed. To deactivate this behavior you can set the
option fundiversity.memoise
to FALSE
by running the following line:
options(fundiversity.memoise = FALSE)
. If you use it interactively it will
only affect your current session. Add it to your script(s) or .Rprofile
file to avoid toggling it each time.
Value
a data.frame with two columns:
-
site
the names of the sites as the row names of the inputsp_com
, -
FRic
the values of functional richness at each site.
NB: FRic is equal to NA
when there are strictly less species in a site
than the number of provided traits. Note that only species with strictly
different trait combinations are considered unique, species that share the
exact same trait values across all traits are considered as one species.
Parallelization
The computation of this function can be parallelized thanks to
future::plan()
. To get more information on how to parallelize your
computation please refer to the parallelization vignette with:
vignette("fundiversity_1-parallel", package = "fundiversity")
References
Cornwell W. K., Schwilk D. W., Ackerly D. D. (2006), A trait-based test for habitat filtering; convex hull volume, Ecology 84(6), doi:10.1890/0012-9658(2006)87[1465:ATTFHF]2.0.CO;2
Examples
data(traits_birds)
fd_fric(traits_birds)