Adding R code and copy of tidy data

R code that produces the required tidy data-set