An R script to create tidy data