From murdoch.duncan at gmail.com  Thu Aug 19 21:43:04 2010
From: murdoch.duncan at gmail.com (Duncan Murdoch)
Date: Thu, 19 Aug 2010 15:43:04 -0400
Subject: [Rd] Does anyone use Sweave (RweaveLatex) option "expand=FALSE"?
In-Reply-To: <B435DDA4-1B79-4AC2-9EE7-51A5F9F8B271@me.com>
References: <4C6D80E3.2090806@gmail.com>
	<B435DDA4-1B79-4AC2-9EE7-51A5F9F8B271@me.com>
Message-ID: <4C6D8948.4030607@gmail.com>

On 19/08/2010 3:17 PM, Marc Schwartz wrote:
> 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...
>   

I probably will before I go ahead with this, but I may as well start on 
this group.

Duncan



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