Josh O'Brien
2013-Feb-04 17:20 UTC
[Rd] R-lang edit: deparse(1:2) is no longer a good example of the R parser's non-invertibility
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)" Even running R-2.14.2, I get instead> deparse(1:2)[1] "1:2"
Duncan Murdoch
2013-Feb-04 17:36 UTC
[Rd] R-lang edit: deparse(1:2) is no longer a good example of the R parser's non-invertibility
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