Intraspecific competition does not predict horn threshold evolution in introduced populations of the bull-horned dung beetle Onthophagus taurus
Data files
May 26, 2026 version files 316.95 KB
-
01_reproduce_density_horn_allometry.R
19.44 KB
-
ALLhorns.csv
269.91 KB
-
OtPadWUSA.csv
17.93 KB
-
README.md
9.66 KB
Abstract
Polyphenic alternative reproductive strategies enable organisms to express reproductive behaviors that match their competitive environment. The dung beetle Onthophagus taurus is a textbook example in which a nutritional threshold distinguishes horned “major” males from hornless “minor” males employing alternative mating strategies. Previous work suggests that horn threshold evolution is driven by intraspecific competition and status-dependent selection, such that high-density populations evolve higher thresholds. However, more recent evidence challenges the predominant role of competition in threshold evolution. Here, we examine geographic variation and thermal plasticity in horn thresholds across previously unstudied invasive populations in the western United States. California populations occur at exceptionally low densities yet exhibit unexpectedly high horn thresholds comparable to those found in Australian populations where densities are more than 100-fold higher. Thermal plasticity was apparent but inconsistent with intraspecific competition being the primary driver of threshold variation. This sheds new light on threshold evolution in this classic model system.
Intraspecific competition does not predict horn threshold evolution in introduced populations of the bull-horned dung beetle Onthophagus taurus
https://doi.org/10.5061/dryad.70rxwdcdc
Data and R code for analyses of population density, horn allometry, and temperature-dependent horn threshold variation in Onthophagus taurus.
Overview
This dataset contains the data and R code needed to reproduce the analyses associated with the manuscript. The analyses examine population-level dung beetle density, horn length allometry, wild-caught horn threshold variation, and horn threshold plasticity under common-garden developmental temperatures.
The R script estimates:
- population-level dung beetle density from dung-pad sampling;
- regional density differences using Tweedie generalized linear mixed models;
- wild-caught horn threshold estimates using nonlinear sigmoidal models;
- common-garden horn threshold estimates at 19°C and 27°C;
- density-threshold relationships among matched populations.
File structure
The files should be arranged as follows:
project_folder/
ALLhorns.csv
OtPadWUSA.csv
01_reproduce_density_horn_allometry.R
README.md
The R script assumes that ALLhorns.csv, OtPadWUSA.csv, and 01_reproduce_density_horn_allometry.R are in the same working directory.
Data files
ALLhorns.csv
Individual-level horn and body-size measurements.
Main columns:
| Column | Description |
|---|---|
Mother |
Maternal/family identifier where available |
Code |
Individual specimen identifier |
HornL |
Horn length in mm |
ProWid |
Pronotum width in mm |
LogPW |
Natural-log transformed pronotum width |
LogHL |
Natural-log transformed horn length |
Location |
Broad geographic location |
Population |
Population code |
Temp |
Developmental temperature or wild-caught/natural category |
WC_or_Lab |
Whether the individual was wild-caught or lab-reared |
Pop_Temp |
Combined population-by-temperature/group identifier |
Range |
Geographic range/region |
Population codes include Western US populations, Eastern US populations, Western Australian populations, and native-range populations.
OtPadWUSA.csv
Dung-pad density data. This file includes new Western US dung-pad sampling data and comparison data extracted from Moczek (2003).
Main columns:
| Column | Description |
|---|---|
Pop |
Population code |
Location |
Sampling location/site |
LoCode |
Short location code |
Region |
Geographic region |
Weight (g) |
Dung pad mass in grams, where available |
Major |
Number of major males collected from the dung pad, where available |
Minor |
Number of minor males collected from the dung pad, where available |
Female |
Number of females collected from the dung pad, where available |
Other |
Number of non-O. taurus beetles collected from the dung pad, where available |
Beetles per 1kg |
Total beetles standardized per kg dung |
DBensEstOt |
O. taurus density estimate per kg dung; this is the main density response variable |
otherSp |
Other species observed, where available |
Ref |
Data source; either This study or Moczek |
Code file
01_reproduce_density_horn_allometry.R
This script reproduces the main analyses. It loads the two data files, cleans the data, fits the horn-threshold and density models, prints key tables to the R console, and displays the main plots.
Main objects created by the script:
| Object | Description |
|---|---|
Allhorns |
Cleaned horn measurement dataset |
WC_all |
Wild-caught horn dataset |
EXP_19_27 |
Lab-reared 19°C and 27°C horn dataset |
wc_thresholds |
Wild-caught population threshold estimates |
thresholds_19_27 |
Common-garden threshold estimates from the population-by-temperature model |
reaction_norm_tests |
Within-population 27°C vs 19°C threshold contrasts |
westcoast_density_estimates |
Raw Western US population density summaries |
west_pop_tweedie_estimates |
Western US population-level Tweedie density estimates |
region_density_emm |
Region-level model-estimated density values |
density_threshold_dat |
Joined density-threshold dataset |
p_wc_sigmoids |
Wild-caught sigmoid plot |
p_reaction_norm |
19°C/27°C threshold reaction norm plot |
p_density_region |
Regional density plot |
p_density_threshold_all |
Density-threshold plot |
How to run the analysis
- Open R or RStudio.
- Set the working directory to the folder containing the two CSV files and the R script.
- Run:
source("01_reproduce_density_horn_allometry.R")
The script will print model summaries and tables to the console. It will also display the main plots.
To inspect tables manually after running the script:
View(wc_thresholds)
View(thresholds_19_27)
View(westcoast_density_estimates)
View(west_pop_tweedie_estimates)
View(region_density_emm)
View(density_threshold_dat)
To display plots manually after running the script:
print(p_wc_sigmoids)
print(p_reaction_norm)
print(p_density_region)
print(p_density_threshold_all)
Analysis summary
Horn allometry
Horn allometry is modelled using a four-parameter sigmoid:
HL = c + (d - c) / (1 + exp[-b(log(PW) - log(theta))])
where:
HLis horn length;PWis pronotum width;cis the lower asymptote;dis the upper asymptote;bis the slope around the inflection point;thetais the horn threshold, estimated as the sigmoid inflection point.
For wild-caught individuals, the main model shares the lower asymptote, upper asymptote, and slope among populations, while allowing the threshold parameter to vary among populations.
For the 19°C/27°C common-garden data, models compare whether the threshold parameter varies by population, temperature, or their interaction.
Density analysis
Dung beetle density is analysed using DBensEstOt, the estimated number of O. taurus individuals per kg dung.
Regional density differences are estimated using a Tweedie generalized linear mixed model with:
DBensEstOt ~ Region + (1 | Location)
Population-level Western US density estimates are also calculated using a Tweedie model with population as a fixed effect.
Density-threshold analysis
The script joins population-level density estimates with wild-caught horn threshold estimates using matching population and region labels. It then fits a simple linear model of threshold size as a function of log-transformed mean density.
Required R packages
The script requires:
dplyrtidyrggplot2purrrtibbleglmmTMBemmeansggrepel
Install missing packages using:
install.packages(c(
"dplyr", "tidyr", "ggplot2", "purrr", "tibble",
"glmmTMB", "emmeans", "ggrepel"
))
Notes
- The script does not require absolute file paths.
- The CSV files and R script should be placed in the same folder before running.
- Population codes and region labels are preserved from the analysis files.
- Some populations are excluded from the wild-caught threshold model where sample size or body-size range made threshold estimation unstable, following the analysis script.
- The density file includes both this study and comparison data from Moczek (2003), identified by the
Refcolumn.
Citation
We encourage users to cite the associated manuscript when using these data. The density comparison data extracted from Moczek (2003) should also be cited where relevant.
