This repository contains the tutorial (as an R script) corresponding to the article "Partitioning the phenotypic variance of reaction norms" (de Villemereuil & Chevin, submitted).
The tutorial uses the tidyverse
set of libraries for the data and model wrangling, the library brms
for the statistical analysis and the library QGglmm
for the analysis of non-linear models.
(The tutorial currently only offers a scenario where the environment is discrete, as it is the most common case, but a "continuous" scenario is in the making as well)