f_rich | R Documentation |
Functional richness calculated as the hypervolume enclosing the functional space.
f_rich(
x,
trait_db = NULL,
tax_lev = "Taxa",
type = NULL,
traitSel = FALSE,
col_blocks = NULL,
nbdim = 2,
distance = "gower",
zerodist_rm = FALSE,
correction = "none",
traceB = FALSE,
set_param = NULL
)
x |
Result of |
trait_db |
A trait dataset. Can be a |
tax_lev |
Character string giving the taxonomic level used to retrieve
trait information. Possible levels are |
type |
The type of variables specified in |
traitSel |
Interactively select traits. |
col_blocks |
A vector that contains the number of modalities for each trait.
Not needed when |
nbdim |
number of dimensions for the multidimensional functional spaces.
We suggest to keep |
distance |
To be used to compute functional distances, |
zerodist_rm |
If |
correction |
Correction methods for negative eigenvalues, can be one of |
traceB |
If |
set_param |
A list of parameters for fine tuning the calculations.
|
Functional richness (FRic) represents the amount of functional space filled by the community (Villeger et al., 2008) and it is related to the community use of resources and productivity (Mason et al., 2005). FRic is defined by the trait extremes and thus reflects the potential maximum functional dissimilarity. FRic is calculated as the hypervolume enclosing the functional space filled by the community. For this the convex hull approach is applied (Cornwell et al., 2006) using the Quickhull algorithm (Barber et al., 1996) that estimates the minimum convex hull which includes all the species considered in the previously defined functional space. Basically, this algorithm determines the taxa in the most extreme points of the functional space, links them to build the convex hull in order to calculate the volume inside it. In particular, the convex hull of a set of points S in n dimensions is the intersection of all convex sets containing S. For N points the convex hull C is then given by the expression:
C = \sum_{j=1}^{N} \lambda_j \ p_j : \ \lambda_j \geq \ for \ all \ j \ and \ \sum_{j=1}^{N} \lambda_j = 1
The functional T dimensional space is built using a certain number of dimensions (T) determined by the axes of a principal component analysis based on the trait dissimilarity matrix. Using a poor quality functional space could led to a biased assessment of FRic and false ecological conclusions so the number of axes retained for its estimation is case-specific and decided following the method proposed in Maire et al., (2015): a pragmatic approach consisting of computing all the possible functional spaces and selecting the most parsimonious one. This method uses the mSD index (mean squared deviation between the initial functional distance and the scaled distance in the functional space), which accounts explicitly for the deviation between the initial and final distance and penalizes the strong deviation. The mSD index has been widely used in statistics to assess errors and it has been demonstrated to work in different contexts and situations (Maire et al., 2015). In addition, when using Gower's distance the mSD ranges from 0 and 1, which helps to interpret quality. Finally, the resulting FRic variable is standardized by its maximum, ranging from 0 to 1. In addition, it must be considered that the number of taxa must be higher than the number of traits to have reliable FRic values (Villeger et al., 2008).
The gower
distance refers to the mixed-variables coefficient of distance of Pavoine et al. (2009) as implemented in the ade4
package.
This distance is meant to be used with fuzzy data.
a vector with fuzzy functional richness results.
results
Results of the f_rich()
function.
traits
A data.frame containing the traits used for the calculations.
taxa
A data.frame
conaining the taxa used for the calculations.
nbdim
Number of dimensions used after calculatin the quality of functional spaces according to Maire et al. (2015).
correction
The type of correction used.
NA_detection
A data.frame
containing taxa on the first column and the corresponding trais with NAs on the second column.
duplicated_traits
If present, list the taxa with the same traits.
parent_child_pairs
For instance in Spanish aspt
both Ferrissia and Planorbidae receive a score.
Abundances of the higher taxonomic level need therefore to be adjusted by subtracting the abundances of the lower taxonomic level.
Barber, C. B., Dobkin, D. P., & Huhdanpaa, H. (1996). The quickhull algorithm for convex hulls. ACM Transactions on Mathematical Software (TOMS), 22(4), 469-483.
Cornwell, W. K., Schwilk, D. W., & Ackerly, D. D. (2006). A trait-based test for habitat filtering: convex hull volume. Ecology, 87(6), 1465-1471
Maire, E., Grenouillet, G., Brosse, S., & Villeger, S. (2015). How many dimensions are needed to accurately assess functional diversity? A pragmatic approach for assessing the quality of functional spaces. Global Ecology and Biogeography, 24(6), 728-740.
Mason, N. W., Mouillot, D., Lee, W. G., and Wilson, J. B. (2005). Functional richness, functional evenness and functional divergence: the primary components of functional diversity. Oikos, 111(1), 112-118.
Pavoine, S., Vallet, J., Dufour, A. B., Gachet, S., & Daniel, H. (2009). On the challenge of treating various types of variables: application for improving the measurement of functional diversity. Oikos, 118(3), 391-402.
Villeger, S., Mason, N. W., & Mouillot, D. (2008). New multidimensional functional diversity indices for a multifaceted framework in functional ecology. Ecology, 89(8), 2290-2301.
aggregate_taxa
data(macro_ex)
data_bio <- as_biomonitor(macro_ex)
data_agr <- aggregate_taxa(data_bio)
data_ts <- assign_traits(data_agr)
# averaging
data_ts_av <- average_traits(data_ts)
col_blocks <- c(8, 7, 3, 9, 4, 3, 6, 2, 5, 3, 9, 8, 8, 5, 7, 5, 4, 4, 2, 3, 8)
f_rich(data_agr, trait_db = data_ts_av, type = "F", col_blocks = col_blocks)
f_rich(data_agr,
trait_db = data_ts_av, type = "F", col_blocks = col_blocks,
nbdim = 10, correction = "cailliez"
)
library(ade4)
rownames(data_ts_av) <- data_ts_av$Taxa
traits_prep <- prep.fuzzy(data_ts_av[, -1], col.blocks = col_blocks)
traits_dist <- ktab.list.df(list(traits_prep))
traits_dist <- dist.ktab(traits_dist, type = "F")
f_rich(data_agr, trait_db = traits_dist)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.