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

Duncan Murdoch murdoch at stats.uwo.ca
Thu Jun 28 03:34:37 CEST 2007


On 27/06/2007 9:06 PM, 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

By default, Sweave runs figure chunks twice (once for pdf, once for 
eps).  They shouldn't change the environment they need to run in.  Not 
sure where this is documented, but it's well known by people who've been 
bitten by it.

Duncan Murdoch



More information about the R-help mailing list