Wrote r script and rmd