R code complementing the R analysis. Necessary to create the figure