add R script and tidy data.txt