This post was updated with advanced tips (at the bottom) 2/12/2016 For scientific projects we often using knitr and R markdown in RStudio to share results and code either in HTML or PDF format. These are great tools for reproducible research. We find, however, that keeping all of our R code in an R markdown (.Rmd) file creates two problems. First, you need to completely re-run the report to evalua
![Making use of external R code in knitr and R markdown](https://cdn-ak-scissors.b.st-hatena.com/image/square/93032fd9ac49901a6ee9c512e80774c732f2dd4a/height=288;version=1;width=512/http%3A%2F%2Fzevross.com%2Fblog%2Fwp-content%2Fuploads%2F2014%2F07%2FCapture.png)