You can also use the child option to include child documents in markdown.


You can continue your main document below, of course.

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.

options(knitr.child.warning = FALSE)
x <- "this code is not evaluated"
x


yihui/knitr documentation built on Nov. 14, 2024, 3:14 p.m.