updated r and rmd files