DOI: 10.5061/dryad.44j0zpctk
title: Data and code from: Head morphology predicts prey traits and drives individual dietary specialization in generalist anurans

description: Functional morphology often constrains the diversity of resources an
 organism can exploit, but the extent to which morphological variation
 drives differences in the magnitude of individual specialization across
 populations remains unclear. We investigated whether predator functional
 morphology (i.e. head shape) predicts individual variation in prey traits
 (size and mobility) and, ultimately, explains differences in the degree of
 dietary individual specialization across populations of two co-occurring
 species of tropical generalist frogs. Specifically, we tested three
 morphology-function predictions: i) individual frogs with laterally short
 jaws relative to head height primarily consume slow and large prey; (ii)
 individuals with laterally long jaws relative to head height primarily
 consume fast prey; and (iii) individuals with relatively wide heads
 primarily consume large prey. We found support for all three
 morphology-function predictions, although patterns were species-specific
 and depended on predator and prey traits. Also, we found that populations
 with stronger head shape-prey size relationships showed higher degrees of
 individual specialization in prey size. Our findings provide the first
 empirical evidence that functional morphology is a key driver of
 individual dietary specialization in populations of generalist anurans and
 highlight the potential role of intraspecific niche variation in
 maintaining phenotypic variation in natural populations.
description: # Data and code from: Head morphology predicts prey traits and drives
 individual dietary specialization in generalist anurans The folder
 "Data_and_Code_PRSB.zip" contains the datasets and R scripts
 used for the statistical analyses in the study entitled "*Head
 morphology predicts prey traits and drives individual dietary
 specialization in generalist anurans*." **Authors**: Jorge A.
 Diaz-Perez*, Márcio S. Araújo, Raul Costa-Pereira **Journal**: Proceedings
 of the Royal Society B: Biological Sciences \***Corresponding author**:
 diazpjorgea@gmail.com ## ***Datasets*** Below is a list of the datasets
 included, along with brief descriptions:
 "**data_prey_lmac.csv**": Dataset to estimate prey size and
 mobility profiles in individuals of Leptodactylus macrosternum using
 Script1 and Script2. "**data_prey_lpod.csv**": Dataset to
 estimate prey size and mobility profiles in individuals of Leptodactylus
 podicipinus using Script1 and Script2.
 "**data_maov_lmac_dor.csv**": Dataset for performing a MANOVA on
 dorsal head shape variables in L. macrosternum using Script3.
 "**data_maov_lpod_dor.csv**": Dataset for performing a MANOVA on
 dorsal head shape variables in L. podicipinus using Script3.
 "**data_maov_lmac_lat.csv**": Dataset for performing a MANOVA on
 lateral head shape variables in L. macrosternum using Script4.
 "**data_maov_lpod_lat.csv**": Dataset for performing a MANOVA on
 lateral head shape variables in L. podicipinus using Script 4.
 "**data_maov_lmac_intrapop.csv**": Dataset for performing
 MANOVAs within populations of L. macrosternum using Script7.
 "**data_maov_lpod_intrapop.csv**": Dataset for performing
 MANOVAs within populations of L. podicipinus using Script7.
 "**data_correlation.csv**": Dataset for testing the correlation
 between R and eta-squared, using Script8. ## ***Column Names*** Several
 datasets share common column names. Below is a list of these column names
 and their descriptions: "**Frog_ID**": Unique identifier for
 each individual. "**site**": The community name where each
 individual was collected. "**sex**": The sex of each individual
 (male: m, female: f). "**Prey_Size**": The size (length) of each
 prey in mm. "**Prey_Mobility**": The assigned mobility category
 for each prey (Slow, Intermediate, Fast). "**PC1**",
 "**PC2**", "**PC3**", etc.: Principal components
 representing the retained head shape variables.
 "**Log_Centroid_Size**": The head size measured as the log of
 centroid size. "**prey_size_profile**": The prey size profile of
 each individual. "**prey_mob_profile**": The prey mobility
 profile of each individual. "**Species**": the studied species
 (Leptodactylus macrosternum: Lmac, Leptodactylus podicipinus: Lpod).
 "**IS_prey_size**": Individual specialization in prey size (R).
 "**eta_squared**": Wilks's partial η² representing the
 strength of prey size-morphology relationship. ## *Scripts* Below is a
 list of the R scripts included, along with brief descriptions of their
 functionality: Note: Scripts are ordered sequentially in the same way
 statistical analysis are presented in the manuscript.
 "**Script1_Prey_Size_Profiles.R**": Code for estimating
 individual prey size profiles in Leptodactylus macrosternum and L.
 podicipinus. "**Script2_Prey_Mobility_Profiles.R**": Code for
 estimating individual prey mobility profiles in Leptodactylus macrosternum
 and L. podicipinus. "**Script3_MANOVAs_Dorsal_Shape.R**": Code
 for performing MANOVAs to assess the relationship between dorsal head
 shape and prey profiles in the studied species.
 "**Script4_MANOVAs_Lateral_Shape.R**": Code for performing
 MANOVAs to assess the relationship between lateral head shape and prey
 profiles in the studied species. "**Script5_IS_Prey_Size.R**":
 Code for calculating individual specialization in prey size (R) within
 each population of the studied species.
 "**Script6_IS_Prey_Mobility.R**": Code for calculating
 individual specialization in prey mobility within each population of the
 studied species. "**Script7_Within_Pops_MANOVAs.R**": Code for
 performing MANOVAs assessing the relationship between dorsal head shape
 and prey profiles within each population of the studied species.
 "**Script8_Correlation_IS_Eta.R**": Code for calculating the
 correlation between individual specialization in prey size (R) and the
 strength of the relationship (eta-squared) between functional morphology
 (dorsal head shape) and prey size in populations of the studied species.
 *The R scripts were written by the first author of this study. For any
 questions or issues, please contact: diazpjorgea@gmail.com * *If you find
 this material useful, please cite the study.*