add R script and tidy dataset