Package: mFD 1.0.7.9000

Camille Magneville

mFD: Compute and Illustrate the Multiple Facets of Functional Diversity

Computing functional traits-based distances between pairs of species for species gathered in assemblages allowing to build several functional spaces. The package allows to compute functional diversity indices assessing the distribution of species (and of their dominance) in a given functional space for each assemblage and the overlap between assemblages in a given functional space, see: Chao et al. (2018) <doi:10.1002/ecm.1343>, Maire et al. (2015) <doi:10.1111/geb.12299>, Mouillot et al. (2013) <doi:10.1016/j.tree.2012.10.004>, Mouillot et al. (2014) <doi:10.1073/pnas.1317625111>, Ricotta and Szeidl (2009) <doi:10.1016/j.tpb.2009.10.001>. Graphical outputs are included. Visit the 'mFD' website for more information, documentation and examples.

Authors:Camille Magneville [aut, cre, cph], Nicolas Loiseau [aut], Camille Albouy [aut], Nicolas Casajus [aut], Thomas Claverie [aut], Arthur Escalas [aut], Fabien Leprieur [aut], Eva Maire [aut], David Mouillot [aut], Sebastien Villeger [aut]

mFD_1.0.7.9000.tar.gz
mFD_1.0.7.9000.zip(r-4.7)mFD_1.0.7.9000.zip(r-4.6)mFD_1.0.7.9000.zip(r-4.5)
mFD_1.0.7.9000.tgz(r-4.6-any)mFD_1.0.7.9000.tgz(r-4.5-any)
mFD_1.0.7.9000.tar.gz(r-4.7-any)mFD_1.0.7.9000.tar.gz(r-4.6-any)
mFD_1.0.7.9000.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
mFD/json (API)

# Install 'mFD' in R:
install.packages('mFD', repos = c('https://frbcesab.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/cmlmagneville/mfd/issues

Pkgdown/docs site:https://cmlmagneville.github.io

Datasets:

On CRAN:

Conda:

7.78 score 30 stars 96 scripts 702 downloads 40 exports 150 dependencies

Last updated from:419cf59c59. Checks:9 OK. Indexed: no.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK189
source / vignettesOK287
linux-release-x86_64OK254
macos-release-arm64OK126
macos-oldrel-arm64OK126
windows-develOK128
windows-releaseOK161
windows-oldrelOK120
wasm-releaseOK147

Exports:alpha.fd.fealpha.fd.fe.plotalpha.fd.hillalpha.fd.multidimalpha.multidim.plotasb.sp.summarybackground.plotbeta.fd.hillbeta.fd.multidimbeta.multidim.plotdist.nearneighbdist.pointdist.to.dffdis.plotfdiv.plotfe.sp.df.computationfeve.plotfide.plotfnnd.plotfori.plotfric.plotfrom.fecoord.to.spcoordfrom.spfe.to.feasbfspe.plotfunct.distfunct.space.plotfusemst.computationpanels.to.patchworkpool.plotquality.fspacesquality.fspaces.plotsearch.sp.nmsp.filtersp.to.fesp.tr.summarytr.cont.fspacetr.cont.scaletraits.faxes.corvertices

Dependencies:abindade4apebackportsbase64encbetapartbootbroombslibcachemcarcarDatacheckmatecliclustercodetoolscolorspacecorrplotcowplotcpp11crayoncrosstalkdata.tabledendextendDerivdigestdoBydoSNOWdplyrDTellipseemmeansestimabilityevaluateFactoMineRfarverfastmapfastmatchFDflashClustfontawesomeforeachforecastforeignFormulafracdifffsGAgawdisgenericsgeometryggplot2ggrepelgluegridExtragtablehighrHmischtmlTablehtmltoolshtmlwidgetsirlbaisobanditeratorsitertoolsjquerylibjsonliteknitrlabelinglaterlatticelazyevalleapslifecyclelinproglme4lmtestlpSolvemagicmagrittrMASSMatrixMatrixModelsmemoisemgcvmicrobenchmarkmimeminpack.lmminqamodelrmultcompViewmvtnormnlmenloptrnnetnumDerivotelpatchworkpbkrtestpermutepicantepillarpixmappkgconfigplyrpromisespurrrquantregR6rappdirsrbibutilsrcddRColorBrewerRcppRcppArmadilloRcppEigenRcppProgressRdpackreformulasreshape2rlangrmarkdownrpartrstatixrstudioapiS7sassscalesscatterplot3dsnowspSparseMstringistringrsurvivaltibbletidyrtidyselecttimeDatetinytexurcautf8vctrsveganviridisviridisLitewithrxfunyamlzoo

mFD: General Workflow
About this tutorial | Overview of the functional framework | 1. Know your data | 1.1. What types of traits am I using? | 1.2. Summarize my traits | 1.3. Summarize my assemblages | 2. Gathering species into functional entities | 3. Computing distances between species based on functional traits | 4. Computing functional spaces & their quality | 4.1. Compute multimensional functional spaces and assess their quality | 4.2. Illustrating the quality of the selected functional spaces | 5. Test correlation between functional axes and traits | 6. Plot functional space | 7. Compute functional diversity indices & plot them | 7.1. Functional alpha diversity indices in a multidimensional space | 7.2. Functional beta diversity indices based on multidimensional space | References

Last update: 2026-04-24
Started: 2021-01-19

Continuous Traits Framework
About this tutorial | 1. Load dataset | 2. Compute the functional space | 3. Plot functional space, compute and illustrate indices | References

Last update: 2026-04-24
Started: 2021-01-19

FAQ
About this FAQ | Functional traits | What is the difference between nominal and ordinal traits? | How should I handle my data if it shows correlated traits? | Intraspecific variation in traits | My species*traits data contains NA, what should I do? | PCoA and negative eigenvalues | Functional space | Overlaying traits as vectors in the functional space | Cumulative variance explained by PCoA axes | Choosing the number of functional axes | Functional Entities vs Species frameworks | How should I choose between working with Functional Entities or Species? | Which indices can I compute with the Functional Entities framework and how? | Functional indices | Access functional specialisation and originality per species | Fuzzy traits and alpha diversity | Fuzzy traits and Weights | High beta diversity in functional space & low beta diversity using Hill numbers | Beta FD Hill and pairs of sites | What does "functionally equally dstinct species" mean? | Null values of Beta FD Hill | How to plot species detected in both assemblages with a third color?

Last update: 2026-04-15
Started: 2024-12-19

How to Deal With Functional Entities
1. Why Functional Entities (FEs)? | 2. Tutorial's data | 3. Gather species into FEs | 4. Compute alpha and beta functional indices | 5. Plot functional indices based on FEs | References

Last update: 2022-11-28
Started: 2021-01-20

Customised plots
About this tutorial | Load data | Plotting more than two assemblages | Basic workflow before plotting | Plotting functional convex-hulls for more than two assemblages for one pair of axis | a - Background | b - Add the global convex-hull | c - Add the convex-hulls and species of the wanted assemblages | Plotting functional convex-hulls for more than two assemblages for several pair of axis | Gathering plots together using the patchwork package | Plotting species differently according to one trait value (coming soon...)

Last update: 2022-10-26
Started: 2022-10-26

Compute and Interpret Quality of Functional Spaces
About this tutorial | 1. Tutorial's data | 2. Compute trait-based distance between species | 3. Compute functional space, quality metrics and plot them | 3.1. Compute functional spaces and associated quality metrics | 3.2. Focus on dendrograms | 3.3. Focus on the effect of square-rooting distance matrix before computing PcoA | References

Last update: 2022-02-11
Started: 2021-01-20

Compute Functional Diversity Hill Indices
About this tutorial | What is this tutorial about? | Let's load data and compute functional distance | Generalisation of Hill numbers for alpha functional diversity | Generalisation of Hill numbers for beta functional diversity | References

Last update: 2021-10-26
Started: 2021-02-10

Readme and manuals

Help Manual

Help pageTopics
Compute the set of indices based on number of species in Functional Entitiesalpha.fd.fe
Illustrate Functional Diversity indices based on Functional Entitiesalpha.fd.fe.plot
Compute Functional alpha-Diversity indices based on Hill Numbersalpha.fd.hill
Compute a set of alpha functional indices for a set of assemblagesalpha.fd.multidim
Plot functional space and chosen functional indicesalpha.multidim.plot
Summarize Assemblage x Species data frameasb.sp.summary
Plot background of multidimensional plotsbackground.plot
Dataset: Baskets Composition in Fruits Speciesbaskets_fruits_weights
Compute Functional beta-Diversity indices based on Hill Numbersbeta.fd.hill
Compute Functional beta-Diversity indices for pairs of assemblages in a multidimensional spacebeta.fd.multidim
Illustrate Functional beta-Diversity indices for pairs of assemblages in a multidimensional spacebeta.multidim.plot
Compute distance of a given point to its nearest neighbor in the functional space and the identity of the nearest neighbordist.nearneighb
Compute distances of all points to a given point in the functional spacedist.point
Merge distance object(s) into a single data framedist.to.df
Plot FDis indexfdis.plot
Plot FDiv indicefdiv.plot
Get a data frame linking Functional Entities names and species namesfe.sp.df.computation
Plot FEve indexfeve.plot
Plot FIde indexfide.plot
Plot FNND indexfnnd.plot
Plot FOrifori.plot
Plot FRic indexfric.plot
Convert the data frame of FEs coordinates to a species coordinates onefrom.fecoord.to.spcoord
Build the assemblage-FEs dataframe from the assemblages-species onefrom.spfe.to.feasb
Dataset: Traits Values of Fruits Speciesfruits_traits
Dataset: Fruits Traits Informationsfruits_traits_cat
Plot FSpefspe.plot
Compute functional distance between speciesfunct.dist
Plot species position in a functional spacefunct.space.plot
Compute FUSE (Functionally Unique, Specialized and Endangered)fuse
Compute the Minimum Spanning Tree (MST) linking species of a given assemblagemst.computation
Plot individual plots along a pair of functional axes into a unique graphpanels.to.patchwork
Plot species from the poolpool.plot
Compute functional spaces and their qualityquality.fspaces
Plot functional space quality with a chosen quality metricquality.fspaces.plot
Get the names of species belonging to a specific Functional Entity (FE)search.sp.nm
Retrieve information about species in a given assemblagesp.filter
Compute Functional Entities composition based on a Species x Traits matrixsp.to.fe
Summarize Species x Traits data framesp.tr.summary
Build a functional space based on continuous traits onlytr.cont.fspace
Scale continuous traitstr.cont.scale
Correlation between Traits and Axestraits.faxes.cor
Compute vertices of the Minimal Convex Hull shaping species from a single assemblage in a multidimensional functional spacevertices