R code script

To generate tidy data with averages