Tidy Data and R code

Final R code and tidy data