[R] \include-mechanism in Sweave?

Mark Wardle mark at wardle.org
Fri Jun 29 19:02:49 CEST 2007


Hi Dietrich,

I am writing my thesis, made up of several papers that have been
expanded into chapters. Each "chapter" was a .tex file until I started
using Sweave.

Now each chapter is an .Rnw file. My master LaTeX document has this:

\include{introduction}
\include{epidemiology}
\include{report}

Latex will look for introduction.tex, epidemiology.tex and report.tex.
I can get LaTeX to only process the introduction by using \includeonly

Of course, the .tex files are generated from Rnw files via a Makefile.
This makefile will only re-generate tex files from Rnw files if the
Rnw file is updated (unless you  give it different rules).

See post: http://tolstoy.newcastle.edu.au/R/e2/help/06/11/4891.html

Hope this helps,

Mark

On 29/06/07, Dietrich Trenkler <Dietrich.Trenkler at uni-osnabrueck.de> wrote:
> Dear HelpeRs,
>
> I'm very fond of Sweave and I use it as often as possible.  It'a a pity
> I can't use it for larger projects or can I?
>
> For instance suppose I have three files file1.rnw, file2.rnw and
> file3.rnw with Sweave code.  Working on file2.rnw I whould like to
> exclude file1.rnw and file3.rnw temporarily and joining all of them
> later.  This amounts to a mechanism similar to using LaTeX's \include
> command.  *Is* there a way to achieve that?
>
> Thank you in advance.
>
> D. Trenkler
>
> --
> Dietrich Trenkler c/o Universitaet Osnabrueck
> Rolandstr. 8; D-49069 Osnabrueck, Germany
> email: Dietrich.Trenkler at Uni-Osnabrueck.de
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email
> ______________________________________________________________________
>


-- 
Dr. Mark Wardle
Clinical research fellow and specialist registrar, Neurology
Cardiff, UK



More information about the R-help mailing list