DOI: 10.5061/dryad.dfn2z35fn
title: Silviculture simplifies anuran–prey networks and increases niche partitioning in the Brazilian Atlantic Forest

description: Habitat loss due to agricultural expansion is the primary threat to
 anurans worldwide. Where natural habitat is converted to monoculture, both
 anuran and prey diversity decline. Beyond species loss, land-use change
 disrupts species interactions and ecosystem functioning, making it
 essential to document how communities reorganize when natural habitats are
 replaced by agricultural systems. Here, we investigated how intrusion of
 Eucalyptus silviculture into Brazil’s Atlantic Forest impacts anuran
 communities, niche partitioning within them, and the structure of
 anuran–prey networks. Because Eucalyptus plantations are a biotically and
 structurally simplified environment, we predicted the abundance and
 diversity of anurans and prey, selectivity of anuran diets, and dietary
 niche partitioning among anuran species to be lower in Eucalyptus
 plantations, and we predicted the anuran–prey network in Eucalyptus would
 have a more connected, non-modular structure. We found that both anuran
 and prey abundance was lower in Eucalyptus plantations compared to
 neighboring Atlantic Forest fragments. Likewise, anuran diversity was also
 reduced in Eucalyptus, but prey diversity was similar between
 environments. Contrary to expectation, we found that dietary selectivity
 was not affected by land-use change and that niche partitioning and
 modularity were significant in the Eucalyptus community, whereas neither
 were significant for the Atlantic Forest community. These findings
 highlight how land conversion can significantly change the abundance and
 diversity of species, driving changes in community composition and
 organization.
description: # Carvalho et al. 2025: Silviculture simplifies anuran–prey networks and
 increases niche partitioning in the Brazilian Atlantic Forest ## Overview
 This repository contains the code and data for the study
 "Silviculture simplifies anuran–prey networks and increases niche
 partitioning in the Brazilian Atlantic Forest" by Carvalho et al.
 (2025). The study investigates the impact of silviculture practices on the
 complexity of anuran-prey networks. ## Contents Our dataset has a markdown
 R script (`code_walkthrough.Rmd`), raw and processed data (`Data/`),
 necessary code and functions (`Source/`), as well as style (`style.css`)
 and bibliography (`references.json`) files used to generate the knitted
 version of the R Markdown file (`code_walkthrough.html`). All files are
 contained inside `Carvalhoetal_2025_Dryad.zip`. ### Data Folder Inside
 `Data/`, the following files are included: #### **Abund.csv** Species
 abundance data for anurans sampled across multiple sites. Each row
 represents a sampling site, and each column corresponds to the number of
 individuals recorded for a given anuran species. ####
 **All_trail_info.csv** Information about sampling sites. * *Trail* :
 Sampling site code * *Environment* : Environment where the specimen was
 sampled * *eucalipto* : Eucalyptus plantation * *mata* : Atlantic Forest
 fragment * *Lat* : Latitude in decimal degrees (WGS84) * *Long* :
 Longitude in decimal degrees (WGS84) * *Period* : Sampling period for each
 transect * *Bouts* : Number of bouts for anuran sampling ####
 **Connectance_Lit_Data.csv** File containing data on previously published
 anuran–prey networks. * *Id* : Identification for original references, as
 cited in Carvalho et al. (2025) Supplementary Information * *Country* :
 Country where the original study site is located * *Lat* : Latitude in
 decimal degrees (WGS84) * *Long* : Longitude in decimal degrees (WGS84) *
 *Ranuran* : Number of anuran species (anuran nodes) in the network *
 *Rprey* : Number of prey (prey nodes) in the network * *Size* : Number of
 nodes (Ranuran + Rprey) in the network * *Conn* : Connectance values for
 each network. Values range from 1 (fully connected network) to 0 (fully
 disconnected network) #### **Data_filt_MW_SVL.csv** Raw dietary data. *
 *Species* : Scientific names of each anuran species from which each prey
 item recorded was identified * *Code* : Unique field number of each
 specimen from which each prey item recorded was identified * *MW* : Mouth
 width (mm) of the specimen from which each prey item recorded was
 identified * *SVL* : Snout-vent length (mm) of the specimen from which
 each prey item recorded was identified * *Weight* : Weight (g) of the
 specimen from which each prey item recorded was identified * *Trail* :
 Sampling site code * *Environment* : Environment where the specimen was
 sampled * *eucalipto* : Eucalyptus plantation * *mata* : Atlantic Forest
 fragment * *Order* : Taxonomic classification of prey item at the Order
 level. If *Empty*, stomach contained no identifiable prey item *
 *Class.inferior* : Taxonomic classification of prey items to the lowest
 level possible, usually suborder. If *Empty*, stomach contained no
 identifiable prey item * *Quantity* : Number of prey items with the same
 taxonomic classification and morphotype encountered for the same specimen
 * *Length* : Length (mm) of the recorded prey item * *Width* : Width (mm)
 of the recorded prey item * *Obs* : Column used for plain text
 observations * *Volume* : Total prey item volume as derived from the
 ellipsoid formula and multiplied by *Quantity* * *Ind.Volume* : Individual
 prey item volume as derived from the ellipsoid formula (4 * pi * *Length*
 * *Width*^2)/3 #### **Diet_sample_indv_vol.csv** Dietary data summarized
 using volume and specimen identification. * *Species* : Scientific names
 of each anuran species from which each prey item recorded was identified *
 *Code* : Unique field number of each specimen from which each prey item
 recorded was identified * *Environment* : Environment where the specimen
 was sampled * *eucalipto* : Eucalyptus plantation * *mata* : Atlantic
 Forest fragment * Remaining columns represent prey item categories and the
 summed volume for each specimen–prey type combination ####
 **Distance_matrix.csv** Distance matrix (km) between sampling sites. ####
 **Freq_eu_diet_matrix_final.csv** Weighted interaction matrix describing
 trophic relationships between anuran predators (columns) and their prey
 (rows) in the Eucalyptus environment. Cell values correspond to the
 frequency of occurrence of each prey type in the diet, representing the
 strength of each predator–prey interaction. ####
 **Freq_mt_diet_matrix_final.csv** Weighted interaction matrix describing
 trophic relationships between anuran predators (columns) and their prey
 (rows) in the Atlantic Forest environment. Cell values correspond to the
 frequency of occurrence of each prey type in the diet, representing the
 strength of each predator–prey interaction. #### **PA_MV.csv** Raw prey
 availability data. * *Trail* : Sampling site code * *Environment* :
 Environment where the specimen was sampled * *eucalipto* : Eucalyptus
 plantation * *mata* : Atlantic Forest fragment * *Order* : Taxonomic
 classification of prey item at the Order level. If *Empty*, stomach
 contained no identifiable prey item * *Class.inferior* : Taxonomic
 classification of prey items to the lowest level possible, usually
 suborder. If *Empty*, stomach contained no identifiable prey item *
 *Length* : Length (mm) of the recorded prey item * *Width* : Width (mm) of
 the recorded prey item * *Volume* : Individual prey item volume as derived
 from the ellipsoid formula (4 * pi * *Length* * *Width*^2)/3 ####
 **PA_sample_composition_freq.csv** Prey availability data summarized using
 frequency. * *Environment* : Environment where the specimen was sampled *
 *eucalipto* : Eucalyptus plantation * *mata* : Atlantic Forest fragment *
 *Trail* : Sampling site code * Remaining columns represent prey item
 categories and the summed frequency for each site–prey type combination
 #### **PA_sample_composition_vol.csv** Prey availability data summarized
 using volume. * *Environment* : Environment where the specimen was sampled
 * *eucalipto* : Eucalyptus plantation * *mata* : Atlantic Forest fragment
 * *Trail* : Sampling site code * Remaining columns represent prey item
 categories and the summed volume for each site–prey type combination ####
 **Rev1_items_sens.csv** A summary of all diet specialization metrics
 measured for anurans across environments. * *Species* : Scientific names
 of each anuran species from which specialization metrics were derived *
 *Environment* : Environment where the specimen was sampled * *EU* :
 Eucalyptus plantation * *AF* : Atlantic Forest fragment * *IT* : Number of
 prey items used for analyses * *Z* : Z-score for the dissimilarity between
 1000 random diet and the observed environmental availability, compared to
 the dissimilarity between the observed diet and environmental
 availability. An anuran is considered to be foraging selectively if the
 observed dissimilarity was significantly greater than that from the
 simulated diets (i.e., Z-score &gt; 2) * *sp50* : Minimum number of prey
 required to account for fifty percent of the diet. * *D* : Electivity for
 the primary prey. #### **Vol_eu_diet_matrix_final.csv** Weighted
 interaction matrix describing trophic relationships between anuran
 predators (columns) and their prey (rows) in the Eucalyptus environment.
 Cell values correspond to the volume of each prey type in the diet,
 representing the strength of each predator–prey interaction. ####
 **Vol_mt_diet_matrix_final.csv** Weighted interaction matrix describing
 trophic relationships between anuran predators (columns) and their prey
 (rows) in the Atlantic Forest environment. Cell values correspond to the
 volume of each prey type in the diet, representing the strength of each
 predator–prey interaction. ### Source Inside `Source/`, there are five
 `.R` scripts containing necessary code or functions used by the file
 `code_walkthrough.Rmd`. The following files are included: ####
 **bootstrap_diet_vol.R** Includes a function that executes a bootstrap to
 simulate null model networks. From the total pool of dietary items (prey
 items consumed), we randomly selected prey items without replacement and
 assigned them to each species, respecting the observed number of prey
 items per species and total volume per prey type. #### **diet_gen.R**
 Function to generate diets based on a given environment (prey abundance).
 #### **morans.R** Function to organize the calculation of Moran's I
 statistic and hypothesis testing. #### **quant_to_count.R** Function to
 expand a data frame based on a quantity column (here prey items). This
 function duplicates rows in the input data frame based on the value in the
 specified column, so that each unit of the quantity is represented as a
 separate row. #### **sp50.R** Function to calculate the SP50 for a diet
 abundance distribution. SP50 is the point where the cumulative proportion
 of the diet reaches 0.5 (or another specified level). ## Requirements * R
 (version 4.0 or higher) * R packages: `dplyr`, `ggplot2`, `tidyverse`,
 `vegan`, `igraph`, `bipartite`, `ggplot2`, `parallel`, `iNEXT` ##
 Acknowledgements The authors thank all those who helped to collect the
 data during field campaigns. We thank Karoline Ceron for sharing
 unpublished data. Also, we thank Melhoramentos Ltda. for supporting this
 project. ANC was funded by São Paulo Research Foundation – FAPESP (grant:
 #2023/06286-7 and 2023/16700-3). MM thanks Conselho Nacional de
 Desenvolvimento Científico e Tecnológico (CNPq) for a research fellowship
 (#309772/2021-4). PRG was supported by FAPESP (grant: #2018/14809-0) and
 CNPq. Fieldwork was possible with funding from FAPESP (grants:
 #2018/14091-1 and #2020/12658-4).