Skip to contents

Compute Functional Dispersion (FDis)

Usage

fd_fdis(traits, sp_com)

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.

Value

a data.frame with two columns:

  • site the names of the sites as the row names of the input sp_com,

  • FDis the values of functional dispersion at each site.

NB: when a site contains no species FDis is equal to 0.

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

Laliberté, E., & Legendre, P. (2010). A distance-based framework for measuring functional diversity from multiple traits. Ecology, 91(1), 299–305. doi: 10.1890/08-2244.1

Examples

data(traits_birds)
data(site_sp_birds)
fd_fdis(traits_birds, site_sp_birds)
#>        site      FDis
#> 1  elev_250 165.58561
#> 2  elev_500 168.34567
#> 3 elev_1000 173.92101
#> 4 elev_1500 156.19006
#> 5 elev_2000  86.39285
#> 6 elev_2500  88.28895
#> 7 elev_3000  97.11743
#> 8 elev_3500  80.70000