Update the R code file with tidy data generation script