[Rd] `@<-` modify its argument when slot is externalptr

Lukas Stadler lukas.stadler at oracle.com
Sun Mar 18 17:48:46 CET 2018


> On 18.03.2018, at 15:54, luke-tierney at uiowa.edu wrote:
> 
> x <- setClass("foo", slots = "bar")
> x <- new("foo", bar = 1)
> y <- x
> y at bar
> ##  [1] 1
> `@<-`(x, bar, 2)
> y at bar
> ##  [1] 2
> 
> Will be fixed soon in R-devel.
> 

I always assumed that this behavior is intentional, in order to make S4 "initialize" work efficiently.

- Lukas
	[[alternative HTML version deleted]]



More information about the R-devel mailing list