\documentclass{article}

\begin{document}

<<test-main>>=
options(width = 60)
summary(iris)
@

Let's see how to work with child documents in knitr. Below we input
the file \textsf{knitr-input-child.Rnw}:

<<child-demo, child='knitr-input-child.Rnw'>>=
@
% Or alternatively, use knit_child('knitr-input-child.Rnw') in \Sexpr

Done!

\end{document}
