## you can write \\Sexpr{knit_child('child-doc.Rnw')} in
# an Rnw file 'main.Rnw' to input child-doc.tex in
# main.tex
## comment out the child doc by
# \\Sexpr{knit_child('child-doc.Rnw', eval = FALSE)}
## use \\include: opts_knit$set(child.command =
# 'include')
Run the code above in your browser using DataCamp Workspace