Data and R code for figures in the results section