[R] Sweave bug? when writing figures / deleting variable in chunk

Deepayan Sarkar deepayan.sarkar at gmail.com
Thu Jun 28 03:31:20 CEST 2007


On 6/27/07, D G Rossiter <rossiter at itc.nl> wrote:
> I have found a quite strange (to me) behaviour in Sweave. It only
> occurs in the following situation:
>
> 1. define a variable in one chunk
> 2. use it within a subsequent figure-generating chunk
> 3. delete it at the end of that same chunk
> Then the Sweave driver chokes, not finding the variable name when
> generating the figure

The reason is that by default, every fig=TRUE chunk is run twice, once
to produce postscript, once for pdf.

-Deepayan



More information about the R-help mailing list