Learn R Programming

mFD

The mFD package provides a “user friendly” interface to compute a global assessment of functional diversity by gathering computation of alpha and beta functional indices. As no package before, it guides users through functional analysis with one function per action to complete, several arguments that can be changed and allows personalized graphical outputs. Various tutorials are available on the mFD website to guide the user through the functional workflow.

Installation

You can install the stable version from CRAN with:

# Install stable version of < mFD > from CRAN ----
install.packages("mFD")

Or you can install the development version from GitHub with:

## Install < remotes > package (if not already installed) ----
if (!requireNamespace("remotes", quietly = TRUE)) {
  install.packages("remotes")
}

## Install dev version of < mFD > from GitHub ----
remotes::install_github("CmlMagneville/mFD", build_vignettes = TRUE)

Get started

library("mFD")

To compute functional diversity indices, users need:

  • a data frame summarizing species traits (species in rows, traits in columns). The mFD package works with all kind of traits: quantitative, ordinal, nominal, circular, and fuzzy-coded.

  • a matrix summarizing species gathering into assemblages (assemblages in rows, species in columns). All assemblages must at least contain one species.

  • a data frame summarizing traits category (first column with traits name, second column with traits type, third column with fuzzy name of fuzzy traits - if no fuzzy traits: NA).

For a complete understanding of the functional workflow and the package possibilities, please refer to the mFD General Workflow.

Citation

Please cite this package as:

Magneville, C., Loiseau, N., Albouy, C., Casajus, N., Claverie, T., Escalas, A., Leprieur, F., Maire, E., Mouillot, D., Villéger, S. (2022). mFD: an R package to compute and illustrate the multiple facets of functional diversity. Ecography https://onlinelibrary.wiley.com/doi/10.1111/ecog.05904

You can also run:

citation("mFD")

Contributions

SV, NL, CA, FL and CM coded the functions and their help. SV and CM led tutorial writings. All authors tested the functions and contributed to writing of helps and tutorials. NC optimized the package and made it ready for CRAN submission.

Copy Link

Version

Install

install.packages('mFD')

Monthly Downloads

550

Version

1.0.7

License

GPL-2

Issues

Pull Requests

Stars

Forks

Maintainer

Camille Magneville

Last Published

February 26th, 2024

Functions in mFD (1.0.7)

beta.fd.hill

Compute Functional beta-Diversity indices based on Hill Numbers
alpha.multidim.plot

Plot functional space and chosen functional indices
alpha.fd.hill

Compute Functional alpha-Diversity indices based on Hill Numbers
baskets_fruits_weights

Dataset: Baskets Composition in Fruits Species
beta.fd.multidim

Compute Functional beta-Diversity indices for pairs of assemblages in a multidimensional space
background.plot

Plot background of multidimensional plots
alpha.fd.multidim

Compute a set of alpha functional indices for a set of assemblages
alpha.fd.fe

Compute the set of indices based on number of species in Functional Entities
feve.plot

Plot FEve index
fide.plot

Plot FIde index
asb.sp.summary

Summarize Assemblage x Species data frame
fdis.plot

Plot FDis index
alpha.fd.fe.plot

Illustrate Functional Diversity indices based on Functional Entities
mFD-package

mFD: Compute and Illustrate the Multiple Facets of Functional Diversity
panels.to.patchwork

Plot individual plots along a pair of functional axes into a unique graph
pool.plot

Plot species from the pool
mst.computation

Compute the Minimum Spanning Tree (MST) linking species of a given assemblage
beta.multidim.plot

Illustrate Functional beta-Diversity indices for pairs of assemblages in a multidimensional space
dist.nearneighb

Compute distance of a given point to its nearest neighbor in the functional space and the identity of the nearest neighbor
fuse

Compute FUSE (Functionally Unique, Specialized and Endangered)
traits.faxes.cor

Correlation between Traits and Axes
quality.fspaces

Compute functional spaces and their quality
vertices

Compute vertices of the Minimal Convex Hull shaping species from a single assemblage in a multidimensional functional space
sp.to.fe

Compute Functional Entities composition based on a Species x Traits matrix
fric.plot

Plot FRic index
funct.dist

Compute functional distance between species
funct.space.plot

Plot species position in a functional space
fori.plot

Plot FOri
fnnd.plot

Plot FNND index
tr.cont.fspace

Build a functional space based on continuous traits only
fruits_traits_cat

Dataset: Fruits Traits Informations
dist.point

Compute distances of all points to a given point in the functional space
dist.to.df

Merge distance object(s) into a single data frame
tr.cont.scale

Scale continuous traits
fdiv.plot

Plot FDiv indice
fspe.plot

Plot FSpe
sp.filter

Retrieve information about species in a given assemblage
quality.fspaces.plot

Plot functional space quality with a chosen quality metric
fruits_traits

Dataset: Traits Values of Fruits Species
sp.tr.summary

Summarize Species x Traits data frame