You probably know that you can include a child document in a knitr document
(such as R Markdown) via the chunk option
child. If you do not, you may see
Section 16.4 of the R Markdown
You may also know that you can convert an R script to R Markdown via the
knitr::spin(). Again, if you do not, you may read Section
3.3 of the book.
Then the question is, when you render an R Markdown …