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

From: Deepayan Sarkar <>
Date: Wed, 27 Jun 2007 18:31:20 -0700

On 6/27/07, D G Rossiter <> 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 mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Thu 28 Jun 2007 - 01:38:44 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 28 Jun 2007 - 02:32:45 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.