[Rd] substitute inconsistent output
Duncan Murdoch
murdoch@dunc@n @end|ng |rom gm@||@com
Wed Mar 18 10:45:24 CET 2020
On 18/03/2020 1:36 a.m., Jan Gorecki wrote:
> Dear R-devel,
>
> Is there anything that we can do to make output of those call more
> consistent? So the first one will return `c(1L, 2L)` rather than
> `1:2`. Note that it is not related to compact integer sequence
> introduced by altrep, it is reproducible on R 3.1.0 as well.
>
> substitute(v+x, list(x=c(1L,2L)))
> #v + 1:2
> substitute(v+x, list(x=c(0L,2L)))
> #v + c(0L, 2L)
>
That's purely the deparser (the returned value from substitute doesn't
contain a call to ":"), but it's not optional.
So the output is consistent, it's the printing that is inconsistent.
Duncan Murdoch
More information about the R-devel
mailing list