From ggrothendieck at gmail.com  Fri Apr 27 19:51:30 2007
From: ggrothendieck at gmail.com (Gabor Grothendieck)
Date: Fri, 27 Apr 2007 13:51:30 -0400
Subject: [Rd] parsing difference between 2.4.1 and 2.5.0
In-Reply-To: <46322AEE.60100@stats.uwo.ca>
References: <971536df0704270834o35b9b7f4vd769b477f8b06b50@mail.gmail.com>
	<46322AEE.60100@stats.uwo.ca>
Message-ID: <971536df0704271051q6a4307f2k90d0e7415699d255@mail.gmail.com>

Thanks, that did it.

On 4/27/07, Duncan Murdoch <murdoch at stats.uwo.ca> wrote:
> On 4/27/2007 11:34 AM, Gabor Grothendieck wrote:
> > I noticed the following difference in parse(text = ...) between R
> > 2.4.1 and R 2.5.0.
> >
> > ===
> >
> >> parse(text = "\"^\" (x ,2 )")
> > expression(x^2)
> >> R.version.string
> > [1] "R version 2.4.1 Patched (2006-12-30 r40331)"
> >
> >
> > ====
> >
> >> parse(text = "\"^\" (x ,2 )")
> > expression("^" (x ,2 ))
> >> R.version.string
> > [1] "R version 2.5.0 RC (2007-04-16 r41194)"
> >
> > ====
> >
> > Ryacas was depending on the behavior in R 2.4.1 so the new
> > behavior breaks it.
> >
> > Is this intentional?  a bug?  How do I get the R 2.4.1 output
> > from R 2.5.0 ?
>
> There's no difference in the parsing, the difference is in the printing.
>  By default 2.5.0 will echo what you typed, whereas 2.4.1 will deparse.
>  You can get the 2.4.1 behaviour using options(keep.source=F) or
> parse(text = "\"^\" (x ,2 )", srcfile=NULL) (as ?parse says).
>
> Duncan Murdoch
>



[Rd] parsing difference between 2.4.1 and 2.5.0
Gabor Grothendieck