From murdoch.duncan at gmail.com  Mon Feb  4 18:36:04 2013
From: murdoch.duncan at gmail.com (Duncan Murdoch)
Date: Mon, 04 Feb 2013 12:36:04 -0500
Subject: [Rd] R-lang edit: deparse(1:2) is no longer a good example of
 the R parser's non-invertibility
In-Reply-To: <CAOwKfPTb6WdevsSYe_9Z_pikN3tivcS_1Or_mQDJ6ZtakZhmJg@mail.gmail.com>
References: <CAOwKfPTb6WdevsSYe_9Z_pikN3tivcS_1Or_mQDJ6ZtakZhmJg@mail.gmail.com>
Message-ID: <510FF184.7050407@gmail.com>

On 04/02/2013 12:20 PM, Josh O'Brien wrote:
> Hello,
>
> Apparently thanks to improvements to the R parser, this example from
> section 6.1 of the R Language Definition no longer holds.
>
> > deparse(quote(c(1, 2)))
> [1] "c(1, 2)"
> > deparse(1:2)
> [1] "c(1, 2)"
>
>

Thanks, I'll replace that example with this one:

 > str(quote(c(1,2)))
  language c(1, 2)
 > str(c(1,2))
  num [1:2] 1 2
 > deparse(quote(c(1,2)))
[1] "c(1, 2)"
 > deparse(c(1,2))
[1] "c(1, 2)"

Duncan Murdoch



[Rd] R-lang edit: deparse(1:2) is no longer a good example of the R parser's non-invertibility
Duncan Murdoch