update to R script and creation of readme.md