R script and the code book