Published October 16, 2025 | Version v1

commecometrics: an R package for trait-environment modelling at the community level

  • 1. Ecology and Evolutionary Biology Program, Texas A&M University. Department of Ecology and Conservation Biology, Texas A&M University, College Station, United States of America
  • 2. Department of Biology, Texas State University, San Marcos, United States of America
  • 3. Department of Natural Resource Management, South Dakota State University, Rapid City, United States of America
  • 4. School of Biological Sciences, Georgia Institute of Technology. School of Earth and Atmospheric Sciences, Georgia Institute of Technology. Interdisciplinary Graduate Program in Quantitative Biosciences., Atlanta, United States of America
  • 5. Department of Ecology and Conservation Biology, Texas A&M University. Ecology and Evolutionary Biology Program, Texas A&M University, College Station, United States of America

Description

The R package commecometrics provides an accessible, open-access framework for modelling trait–environment relationships using community-level trait data from modern and ancient species. Ecometrics links the trait distributions of communities to their local environmental variables, enabling the reconstruction of past conditions and the prediction of community responses under future climate change. Existing tools for functional trait analysis often lack palaeontological integration or are limited to specific taxa. commecometrics addresses these gaps by offering a suite of functions to summarise trait distributions, construct ecometric models, visualise trait–environment relationships, assess model robustness and reconstruct environmental conditions. The package is designed for broad applicability across ecological and palaeoecological studies and includes tools for trait-based biodiversity analysis beyond ecometrics. Through a worked example using carnassial tooth relative blade length (RBL) in carnivoran mammals, we demonstrate the package's capabilities for analysing trait–environment dynamics across space and time.

Files

BDJ_article_168221.pdf

Files (503.8 kB)

Name Size
md5:8d75b1d9fb8b7a4ff808c00cf3375d11
503.8 kB Preview Download

System files (93.0 kB)

Name Size
md5:0469c4d794cd1307ee491a89006cf967
93.0 kB Download

Linked records

Additional details

References

  • Carmona C, Pavanetto N, Puglielli G (2024) funspace: An R package to build, analyse and plot functional trait spaces. Diversity and Distributions 30 (4). https://doi.org/10.1111/ddi.13820
  • Cheng J, Schloerke B, Karambelkar B, Xie Y (2015) leaflet: Create Interactive Web Maps with the JavaScript 'Leaflet' Library. Institution: Comprehensive R Archive Network Pages: 2.2.2. https://doi.org/10.32614/CRAN.package.leaflet
  • Debastiani V, Pillar V (2012) SYNCSA—R tool for analysis of metacommunities based on functional traits and phylogeny of the community components. Bioinformatics 28 (15): 2067‑2068. https://doi.org/10.1093/bioinformatics/bts325
  • Denelle P, Weigelt P, Kreft H (2023) An R package to access the Global Inventory of Floras and Traits. Methods in Ecology and Evolution 14 (11): 2738‑2748. https://doi.org/10.1111/2041-210X.14213
  • Dunn R, Strömberg CE, Madden R, Kohn M, Carlini A (2015) Linked canopy, climate, and faunal change in the Cenozoic of Patagonia. Science 347 (6219): 258‑261. https://doi.org/10.1126/science.1260947
  • Eronen J, Puolamäki K, Liu L, Lintulaakso K, Damuth J, Janis C, Fortelius (2010) Precipitation and large herbivorous mammals II: application to fossil data. Evolutionary Ecology Research 12: 235‑248.
  • Fortelius M, Eronen J, Jernvall J, Liu LP, Pushkina D, Rinne J, Tesakov A, Vislobokova I, Zhang ZQ, Zhou LP (2002) Fossil mammals resolve regional patterns of Eurasian climate change over 20 million years. Evolutionary Ecology Research 4 (4): 1005‑1016.
  • Grenié M, Gruson H (2023) fundiversity: a modular R package to compute functional diversity indices. Ecography 2023 (3). https://doi.org/10.1111/ecog.06585
  • Head J, Bloch J, Hastings A, Bourque J, Cadena E, Herrera F, Polly PD, Jaramillo C (2009) Giant boid snake from the Palaeocene neotropics reveals hotter past equatorial temperatures. Nature 457 (7230): 715‑717. https://doi.org/10.1038/nature07671
  • IUCN (2025) The IUCN Red List of Threatened Species. URL: https://www.iucnredlist.org
  • Jackson JC, Erwin D (2006) What can we learn about ecology and evolution from the fossil record? Trends in Ecology & Evolution 21 (6): 322‑328. https://doi.org/10.1016/j.tree.2006.03.017
  • Janis CM (1988) An estimation of tooth volume and hypsodonty indices in ungulate mammals, and the correlation of these factors with dietary preferences. Mémoires du Museum National d'Histoire Naturelle367‑387. URL: https://www.scienceopen.com/document?vid=bf318866-61a1-4ded-ae94-8de022262c6b
  • Koch P (1998) Isotopic reconstruction of the past continental environments. Annual Review of Earth and Planetary Sciences 26 (Volume 26, 1998): 573‑613. https://doi.org/10.1146/annurev.earth.26.1.573
  • Lam OHY, Kattge J, Tautenhahn S, Boenisch G, Kovach K, Townsend P (2024) 'rtry': An R package to support plant trait data preprocessing. Ecology and Evolution 14 (5). https://doi.org/10.1002/ece3.11292
  • Lauer D, Lawing AM, Short R, Manthi F, Müller J, Head J, McGuire J (2023) Disruption of trait-environment relationships in African megafauna occurred in the middle Pleistocene. Nature Communications 14 (1). https://doi.org/10.1038/s41467-023-39480-8
  • Lawing AM, Head J, Polly P (2012) The ecology of morphology: The ecometrics of locomotion and macroenvironment in North American snakes. In: Louys J (Ed.) Paleontology in Ecology and Conservation. [ISBN 978-3-642-25037-8]. https://doi.org/10.1007/978-3-642-25038-5_7
  • 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 2022 (1). https://doi.org/10.1111/ecog.05904
  • McGuire J, Lawing AM, Díaz S, Stenseth N (2023) The past as a lens for biodiversity conservation on a dynamically changing planet. Proceedings of the National Academy of Sciences 120 (7). https://doi.org/10.1073/pnas.2201950120
  • Parker A, Müller J, Boisserie J, Head J (2023) The utility of body size as a functional trait to link the past and present in a diverse reptile clade. Proceedings of the National Academy of Sciences 120 (7). https://doi.org/10.1073/pnas.2201948119
  • Pavoine S (2020) adiv: An r package to analyse biodiversity in ecology. Methods in Ecology and Evolution 11 (9): 1106‑1112. https://doi.org/10.1111/2041-210X.13430
  • Pedersen TL (2019) patchwork: The composer of plots. Institution: Comprehensive R Archive Network Pages: 1.3.0. https://doi.org/10.32614/CRAN.package.patchwork
  • Peppe D, Baumgartner A, Flynn A, Blonder B (2017) Reconstructing paleoclimate and paleoecology using fossil leaves. https://doi.org/10.31233/osf.io/stzuc
  • Polly, Eronen J, Fred M, Dietl G, Mosbrugger V, Scheidegger C, Frank D, Damuth J, Stenseth N, Fortelius M (2011) History matters: ecometrics and integrative climate change biology. Proceedings of the Royal Society B: Biological Sciences https://doi.org/10.1098/rspb.2010.2233
  • Polly, Lawing AM, Eronen J, Schnitzler J (2016) Processes of ecometric patterning: modelling functional traits, environments, and clade dynamics in deep time. Biological Journal of the Linnean Society 118 (1): 39‑63. https://doi.org/10.1111/bij.12716
  • Polly PD (2010) Tiptoeing through the trophics: geographic variation in carnivoran locomotor ecomorphology in relation to environment. In: Goswami A, Friscia A (Eds) Carnivoran Evolution. Cambridge University Press [ISBN 978-0-521-51529-0 978-0-521-73586-5 978-1-139-19343-6]. https://doi.org/10.1017/CBO9781139193436.014
  • Polly PD, Head J (2015) Measuring earth-life transitions: Ecometric analysis of functional traits from Late Cenozoic Vertebrates. The Paleontological Society Papers 21: 21‑46. https://doi.org/10.1017/S1089332600002953
  • Schap J, McGuire J, Lawing AM, Manthi F, Short R (2024) Ecometric models of small mammal hypsodonty can estimate paleoprecipitation across eastern Africa. Palaeogeography, Palaeoclimatology, Palaeoecology 643 https://doi.org/10.1016/j.palaeo.2024.112181
  • Scott D (1979) On optimal and data-based histograms. Biometrika 66 (3): 605‑610. https://doi.org/10.1093/biomet/66.3.605
  • Short R, Lawing AM (2021) Geography of artiodactyl locomotor morphology as an environmental predictor. Diversity and Distributions 27 (9): 1818‑1831. https://doi.org/10.1111/ddi.13371
  • Short R, Pinson K, Lawing AM (2021) Comparison of environmental inference approaches for ecometric analyses: Using hypsodonty to estimate precipitation. Ecology and Evolution 11 (1): 587‑598. https://doi.org/10.1002/ece3.7081
  • Short R, McGuire J, Polly PD, Lawing AM (2023) Trophically integrated ecometric models as tools for demonstrating spatial and temporal functional changes in mammal communities. Proceedings of the National Academy of Sciences 120 (7). https://doi.org/10.1073/pnas.2201947120
  • Siciliano‐Martina L, McGuire J, Hurtado‐Materon M, Short R, Lauer D, Schap J, Müller J, Manthi F, Head J, Lawing AM (2024) Ecometrics demonstrates that the functional dental traits of carnivoran communities are filtered by climate. Ecology and Evolution 14 (10). https://doi.org/10.1002/ece3.70214
  • Vermillion WA, Polly PD, Head J, Eronen J, Lawing AM (2018) Ecometrics: A trait-based approach to paleoclimate and paleoenvironmental reconstruction. In: Croft D, Su D, Simpson S (Eds) Methods in Paleoecology: Reconstructing Cenozoic Terrestrial Environments and Ecological Communities. Springer Cham [ISBN 978-3-319-94264-3]. https://doi.org/10.1007/978-3-319-94265-0_17
  • Wickham H, Chang W, Henry L, Pedersen TL, Takahashi K, Wilke C, Woo K, Yutani H, Dunnington D, Van Den Brand T (2007) ggplot2: Create elegant data visualisations using the grammar of graphics. Institution: Comprehensive R Archive Network Pages: 3.5.2. https://doi.org/10.32614/CRAN.package.ggplot2
  • Wilson O, Sánchez R, Chávez-Aponte E, Carrillo-Briceño J, Saarinen J (2024) Application of herbivore ecometrics to reconstruct Neogene terrestrial palaeoenvironments in Falcón, Venezuela. Palaeogeography, Palaeoclimatology, Palaeoecology 651 https://doi.org/10.1016/j.palaeo.2024.112397
  • Zhang T, Russell M, Domke G (2021) FEEr: An R package for calculating functional extension and evenness index. Ecological Indicators 133 https://doi.org/10.1016/j.ecolind.2021.108365
  • Žliobaitė I, Lawing AM (2025) Trait-based approaches to paleoenvironmental reconstructions: What is in the community-weighted trait mean? Palaeogeography, Palaeoclimatology, Palaeoecology 672 https://doi.org/10.1016/j.palaeo.2025.112982