Thanks for the report. This is now fixed in R-devel and R-patched
by increasing NAMED on the RHS value to 2 when it is not 0.
Best,
luke
On Tue, 8 Jan 2013, Justin Talbot wrote:
In R version 2.15.2 (2012-10-26) i386-apple-darwin9.8.0/i386 (32-bit) I get
the following:
a <- list(1)
(a[[1]]
On Tue, 8 Jan 2013, Justin Talbot wrote:
In R version 2.15.2 (2012-10-26) i386-apple-darwin9.8.0/i386 (32-bit) I get
the following:
a <- list(1)
(a[[1]] <- a)
[[1]]
[[1]][[1]]
[1] 1
but
a <- list(1)
b <- a
(a[[1]] <- a)
[[1]]
[1] 1
And similarly:
a <- list(x=1)
(a$x <- a)
$x
$x$x
[1]
In R version 2.15.2 (2012-10-26) i386-apple-darwin9.8.0/i386 (32-bit) I get
the following:
> a <- list(1)
> (a[[1]] <- a)
[[1]]
[[1]][[1]]
[1] 1
but
> a <- list(1)
> b <- a
> (a[[1]] <- a)
[[1]]
[1] 1
And similarly:
> a <- list(x=1)
> (a$x <- a)
$x
$x$x
[1] 1
but
> a <- list(x=1)
> b <- a
>