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


Try the knitr package in your browser

Any scripts or data that you put into this service are public.

knitr documentation built on June 22, 2024, 9:25 a.m.