Home > Research > Publications & Outputs > mFD: an R package to compute and illustrate the...


Text available via DOI:

View graph of relations

mFD: an R package to compute and illustrate the multiple facets of functional diversity

Research output: Contribution to Journal/MagazineJournal articlepeer-review

  • C. Magneville
  • N. Loiseau
  • C. Albouy
  • N. Casajus
  • T. Claverie
  • A. Escalas
  • F. Leprieur
  • E. Maire
  • D. Mouillot
  • S. Villéger
<mark>Journal publication date</mark>31/01/2022
Issue number1
Number of pages15
Publication StatusPublished
Early online date13/12/21
<mark>Original language</mark>English


Functional diversity (FD), the diversity of organism attributes that relates to their interactions with the abiotic and biotic environment, has been increasingly used for the last two decades in ecology, biogeography and conservation. Yet, FD has many facets and their estimations are not standardized nor embedded in a single tool. mFD (multifaceted functional diversity) is an R package that uses matrices of species assemblages and species trait values as building blocks to compute most FD indices. mFD is firstly based on two functions allowing the user to summarize trait and assemblage data. Then it calculates trait-based distances between species pairs, informs the user whether species have to be clustered into functional entities and finally computes multidimensional functional space. To let the user choose the most appropriate functional space for computing multidimensional functional diversity indices, two mFD functions allow assessing and illustrating the quality of each functional space. Next, mFD provides 6 core functions to calculate 16 existing FD indices based on trait-based distances, functional entities or species position in a functional space. The mFD package also provides graphical functions based on the ggplot library to illustrate FD values through customizable and high-resolution plots of species distribution among functional entities or in a multidimensional space. All functions include internal validation processes to check for errors in data formatting which return detailed error messages. To facilitate the use of mFD framework, we built an associated website hosting five tutorials illustrating the use of all the functions step by step.