Uploading R code for creating tidy dataset.