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

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

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



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. 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 https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.