You can also use the `child` option to include child documents in markdown. ```{r test-main, child='knitr-child.Rmd'} ``` You can continue your main document below, of course. ```{r test-another} pmax(1:10, 5) ``` If you refer to a child document in a chunk, only the child document will be evaluated. Other code in the chunk will not be evaluated when you `render` the document. ```{r test-warning-option, include=FALSE} options(knitr.child.warning = FALSE) ``` ```{r test-warning, child='knitr-child2.Rmd'} x <- "this code is not evaluated" x ```