This code was used for the analysis of the paper:
Denis et al. (2025) Avoiding misleading estimates of among-individual variance caused by non-random sampling of individuals in a changeable environment. Methods Ecol. Evol.
To reproduce the analyses, follow these steps:
- Install R and Rtools
- Set up the reproducible environment
Install the {renv}
package (if not already installed)
install.packages("renv")
Then from the root of this project:
renv::restore()
This will install all required package dependencies as specified in the renv.lock
file.
- Run the analysis
Execute the main workflow by running:
source("run.R")
The pipeline is managed with the {targets}
package. This ensures analyses are fully reproducible and results are built following declared dependencies.
- Ensure your working directory is set to the root of the project before running scripts.
- All package versions are pinned via
{renv}
to guarantee reproducibility.