added R script and CodeBook