From marc_schwartz at me.com  Thu Aug 19 21:17:57 2010
From: marc_schwartz at me.com (Marc Schwartz)
Date: Thu, 19 Aug 2010 14:17:57 -0500
Subject: [Rd] Does anyone use Sweave (RweaveLatex) option "expand=FALSE"?
In-Reply-To: <4C6D80E3.2090806@gmail.com>
References: <4C6D80E3.2090806@gmail.com>
Message-ID: <B435DDA4-1B79-4AC2-9EE7-51A5F9F8B271@me.com>

On Aug 19, 2010, at 2:07 PM, Duncan Murdoch wrote:

> I am trying to improve the error reporting in Sweave documents, so that if you have a syntax error in a code chunk, it will tell you which line of your input file contained the error.
> 
> For example, currently you get this:
> 
> Error:  chunk 1 (label=named)
> Error in parse(text = chunk) : unexpected symbol in "x <- foo bar"
> Execution halted
> 
> and I'd like errors to be more like this:
> 
> Error:  chunk 1 (label=named)
> Error in parse(text = chunk, srcfile = srcfile) :
> test.Rnw:9:10: unexpected symbol
> 9: x <- foo bar
>           ^
> Execution halted
> 
> It turns out that this requires changes that make the "expand=FALSE" option quite hard to implement.  Is anyone using it?  For those who don't know it, "expand=FALSE" means that a code chunk like
> 
> <<echo=TRUE, keep.source=TRUE,expand=FALSE>>=
> z <- 3
> <<named>>
> @
> 
> will be displayed as
> 
> > z <- 3
> > <<named>>
> 
> rather than expanding the named chunk.  I'd like to drop the option, so that the default behaviour (which has always been equivalent to "expand = TRUE") would be the only behaviour.
> 
> Duncan Murdoch


I don't. So 1 "go ahead and drop it" vote...

You may want to post this to R-Help though Duncan, as I suspect there may be more Sweave users there than here...

Thanks and regards,

Marc Schwartz



[Rd] Does anyone use Sweave (RweaveLatex) option "expand=FALSE"?
Marc Schwartz