Completed R script and uploaded result as tidy.txt