DOI: 10.5061/dryad.mcvdnckc7
title: The division of food space among mammalian species on biomes

description: Understanding how species ecological partition functions across biomes is
 fundamental to macroecology and conservation biology. Here, we examine the
 global distribution of dietary strategies in terrestrial mammals, focusing
 on how biome specialization modulates trophic diversity and structure on a
 broad geographical scale. Using species-level data from over 3,600
 terrestrial mammal species, we constructed a multivariate dietary space
 and quantified the area, redundancy, dispersion, uniqueness, and turnover
 of trophic strategies across ten major biomes. Species were classified as
 biome specialists, moderate generalists, or extreme generalists based on
 their biome breadth. By analysing biome specialists and generalists
 separately, we show that biome specialists tend to exhibit more
 constrained and compositionally distinct dietary niches in less productive
 biomes, while generalists, particularly moderate generalists, dominate
 functional space occupancy in all biomes, even the harsher ones such as
 tundra and taiga. This highlights how environmental constraints and
 ecological roles shape trophic strategies at global scale. Notably,
 extreme generalists tended to exhibit more carnivorous or insectivorous
 diets, suggesting a strategy based on mobile predation or opportunism
 rather than a highly diversified omnivory. Despite these general patterns,
 highly productive biomes supported the greatest diversity of dietary
 strategies, with higher functional redundancy and niche packing.
 Nestedness and turnover analyses revealed that biome specialists diets are
 often subsets of generalists diets, but with significant compositional
 shifts across biomes. These findings underscore the dual role of biome
 generalists as both functional stabilizers and potential limiters of
 ecological diversity, and highlight the vulnerability of specialist
 species to global change. Our study offers a mechanistic framework for
 understanding how dietary strategies interact with environmental
 filtering, and for identifying functional risks in changing ecosystems.
description: # The division of food space among mammalian species on biomes Dataset
 DOI: [10.5061/dryad.mcvdnckc7](10.5061/dryad.mcvdnckc7) ## Description of
 the data and file structure This repository contains an R script used for
 analyzing the functional trait space of terrestrial mammals in relation to
 biome specialization and trophic breadth. The analysis includes
 dimensionality reduction, diversity metrics, redundancy, uniqueness, and
 statistical testing of functional space occupation across different biome
 types. ## Project Structure ##### **Input Files**: `mamm_data_terr.txt`: A
 tab-delimited text file containing trait and ecological data for
 terrestrial mammal species. Columns include: * **MSWFamilyLatin**: Family
 name according to *Mammal Species of the World* (MSW). * **MSW3_ID**:
 Unique species identifier from the MSW3 taxonomy. * **Scientific**:
 Scientific binomial name of the species (e.g., *Ornithorhynchus
 anatinus*). * **Diet.Inv**: Proportion of diet composed of invertebrates
 (fuzzy-coded; 0–100 scale). * **Diet.Vend**: Proportion of diet composed
 of vertebrate endotherms (e.g., mammals, birds). * **Diet.Vect**:
 Proportion of diet composed of vertebrate ectotherms (e.g., reptiles,
 amphibians). * **Diet.Vfish**: Proportion of diet composed of fish. *
 **Diet.Vunk**: Proportion of diet composed of unspecified vertebrates. *
 **Diet.Scav**: Proportion of diet composed of scavenged vertebrate
 material. * **Diet.Fruit**: Proportion of diet composed of fruit. *
 **Diet.Nect**: Proportion of diet composed of nectar. * **Diet.Seed**:
 Proportion of diet composed of seeds. * **Diet.PlantO**: Proportion of
 diet composed of other plant matter (e.g., leaves, stems). *
 **ForStrat.Value**: Foraging stratum classification (e.g., "G" =
 ground-dwelling, "Ar" = arboreal, "S" = scansorial). *
 **Activity.Nocturnal**: Nocturnal activity (binary; 1 = active at night, 0
 = not). * **Activity.Crepuscular**: Crepuscular activity (binary; 1 =
 active at dawn/dusk, 0 = not). * **Activity.Diurnal**: Diurnal activity
 (binary; 1 = active during the day, 0 = not). * **BodyMass.Value**:
 Average adult body mass (in grams). * **BodyMass.SpecLevel**: Indicates
 taxonomic resolution of the body mass data (e.g., 1 = species-level, 0 =
 higher-level estimate). * **litter or clutch size n**: Average litter or
 clutch size (number of offspring per reproductive event). * **order**:
 Taxonomic order of the species (e.g., Monotremata, Didelphimorphia).
 `biome_mammals.csv`: A CSV file listing mammal species and their biome
 associations, along with basic taxonomic and ecological traits. Columns
 include: * **BIOME**: Numeric code representing one of 14 terrestrial
 biomes, following the classification of Hernández Fernández et al. (2022).
 * **binomial**: Scientific name of the species (e.g., *Panthera leo*). *
 **presence**: Indicates whether the species is present in the given biome
 (binary; 1 = present, 0 = absent). * **order_**: Taxonomic order of the
 species (e.g., CARNIVORA, RODENTIA). * **family**: Taxonomic family (e.g.,
 FELIDAE, MURIDAE). * **genus**: Taxonomic genus (e.g., *Panthera*,
 *Canis*). * **terrestial**: Indicates whether the species is considered
 terrestrial (binary; 1 = terrestrial, 0 = aquatic or semi-aquatic). *
 **Specialist**: Biome specialization status based on species distribution
 breadth (categorical; values include “Specialist” or “Generalist”).
 `Food.R`: The R script used to perform all analyses described in the
 related manuscript ## Main Analyses Performed * **Principal Coordinates
 Analysis (PCoA)** on fuzzy-coded dietary traits * **Rarefaction Analyses**
 to standardize across sample sizes * **Functional Space Occupation** using
 convex hulls per biome * **Functional Space Overlap Analysis**: Nestedness
 and turnover metrics * **Functional Redundancy** across specialization
 groups and biomes * **Functional Dispersion (FDis)** calculation by group
 * **Functional Uniqueness** (nearest-neighbor-based) * **Trophic vs.
 Geographic Breadth Relationship** * **Diet Composition Profiling** across
 biomes and specialization groups ## Requirements This script depends on
 the following R packages: ade4, dplyr, ggplot2, ggpubr, ggrepel,
 ggConvexHull, GeoRange, tidyverse, purrr, FD, xlsx, reshape2, scales,
 nlme, ggeffects, sf. ## Usage * Place your input files in the designated
 working directory (`setwd()` is specified early in the script). * Run the
 script in full (`source("Food.R")`) or section by section. *
 Output files will be generated in `./output2/` and `./plots/`. ## Notes *
 Taxonomic harmonization is performed to align species names across
 datasets. * Functional metrics (FDis, uniqueness, redundancy) are computed
 using the first two PCoA axes. * Output tables and plots are designed to
 support publication-ready figures.