added rcode to rmd file