R Script used to produce TidyData