FD-package: Measuring Functional Diversity from Multiple Traits, and...

FD-packageR Documentation

Measuring Functional Diversity from Multiple Traits, and Other Tools for Functional Ecology


FD is a package to compute different multidimensional functional diversity (FD) indices. It implements a distance-based framework to measure FD that allows any number and type of functional traits, and can also consider species relative abundances. It also contains other tools for functional ecologists (e.g. maxent).


Package: FD
Type: Package
Version: 1.0-12
Date: 2014-08-19
License: GPL-2
LazyLoad: yes
LazyData: yes

FD computes different multidimensional FD indices. To compute FD indices, a species-by-trait(s) matrix is required (or at least a species-by-species distance matrix). gowdis computes the Gower dissimilarity from different trait types (continuous, ordinal, nominal, or binary), and tolerates NAs. It can treat ordinal variables as described by Podani (1999), and can handle asymetric binary variables and variable weights. gowdis is called by dbFD, the main function of FD.

dbFD uses principal coordinates analysis (PCoA) to return PCoA axes, which are then used as ‘traits’ to compute FD. dbFD computes several multidimensional FD indices, including the three indices of Villéger et al. (2008): functional richness (FRic), functional evenness (FEve), and functional divergence (FDiv). It also computes functional dispersion (FDis) (Laliberté and Legendre 2010), Rao's quadratic entropy (Q) (Botta-Dukát 2005), a posteriori functional group richness (FGR), and the community-level weighted means of trait values (CWM), an index of functional composition. Some of these indices can be weighted by species abundances. dbFD includes several options for flexibility.


Etienne Laliberté, Pierre Legendre and Bill Shipley

Maintainer: Etienne Laliberté <etiennelaliberte@gmail.com> https://www.elaliberte.info/


Botta-Dukát, Z. (2005) Rao's quadratic entropy as a measure of functional diversity based on multiple traits. Journal of Vegetation Science 16:533-540.

Laliberté, E. and P. Legendre (2010) A distance-based framework for measuring functional diversity from multiple traits. Ecology 91:299-305.

Podani, J. (1999) Extending Gower's general coefficient of similarity to ordinal characters. Taxon 48:331-340.

Villéger, S., N. W. H. Mason and D. Mouillot (2008) New multidimensional functional diversity indices for a multifaceted framework in functional ecology. Ecology 89:2290-2301.


# examples with a dummy dataset

ex1 <- gowdis(dummy$trait)

ex2 <- functcomp(dummy$trait, dummy$abun)

ex3 <- dbFD(dummy$trait, dummy$abun)

# examples with real data from New Zealand short-tussock grasslands
# these examples may take a few seconds to a few minutes each to run

ex4 <- gowdis(tussock$trait)

ex5 <- functcomp(tussock$trait, tussock$abun)

# 'lingoes' correction used because 'sqrt' does not work in that case
ex6 <- dbFD(tussock$trait, tussock$abun, corr = "lingoes")

## Not run: 
# ward clustering to compute FGR, cailliez correction
ex7 <- dbFD(tussock$trait, tussock$abun, corr = "cailliez",
calc.FGR = TRUE, clust.type = "ward")
# choose 'g' for number of groups
# 6 groups seems to make good ecological sense

# however, calinksi criterion in 'kmeans' suggests
# that 6 groups may not be optimal
ex8 <- dbFD(tussock$trait, tussock$abun, corr = "cailliez",
calc.FGR = TRUE, clust.type = "kmeans", km.sup.gr = 10)

## End(Not run)

FD documentation built on May 2, 2022, 5:08 p.m.