Added writing to file of resulting tidy dataset (with the means for measurements) in the R script.