I am just discovering Sweave
and R
. I have seen some examples of Sweave
documents and have also started to write one or two on my own. I a
I recommend using RStudio (http://www.rstudio.com/ide/) instead of WinEdt. Sweave is nicely integrated into that IDE and, as in WinEdt you can set one file as the master file. From the master file you can include child files using
\SweaveInput{Child.Rnw}
You can link a child file back to the master file by including the directive
% !Rnw root = Master.Rnw
in the child file. That way when working on a child file and typesetting it, RStudio know to typeset the master file.
The details are explained in the RStudio documentation at http://www.rstudio.com/ide/docs/authoring/multiple_rnw_files
The nicest feature is that Synctex and TeX error log navigation still work even when working with multi-file documents.