fa_fric_ashape: Compute Functional Richness (FRic) with alpha-shape

Description Usage Arguments Value Parallelization References Examples

View source: R/fa_fric_ashape.R

Description

Functional Richness is computed as the volume of the α-shape from all included traits.

Usage

1
fa_fric_ashape(traits, sp_com, stand = FALSE, avalue = "auto")

Arguments

traits

The matrix dataset for which you want to compute the index

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 matrix, a data.frame, or a Matrix::Matrix() object.

stand

a boolean indicating whether to standardize FRic values over the observed maximum over all species (default: FALSE). This scales FRic between 0 and 1. NB: The maximum FRic values only considers species that are present in both site-species and trait matrices. If you want to consider species that are absent in the site-species matrix, add corresponding columns of 0s.

avalue

The value of the α parameter to compute the α-shape. Set to "auto" (the default) to get the α* value as defined in Gruson (2020).

Value

a data.frame with two columns:

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("parallel", package = "fundiversity")

References

Gruson H. 2020. Estimation of colour volumes as concave hypervolumes using α-shapes. Methods in Ecology and Evolution, early view doi: 10.1111/2041-210X.13398

Examples

1
2
data(traits_birds, package = "fundiversity")
fa_fric_ashape(traits_birds[,-1])

Bisaloo/funalpha documentation built on Dec. 17, 2021, 11:49 a.m.