From lukas.stadler at oracle.com  Sun Mar 18 17:48:46 2018
From: lukas.stadler at oracle.com (Lukas Stadler)
Date: Sun, 18 Mar 2018 17:48:46 +0100
Subject: [Rd] `@<-` modify its argument when slot is externalptr
In-Reply-To: <alpine.DEB.2.20.1803180933350.4709@luke-Latitude>
References: <1521382063.7888.5.camel@gmx.cn>
 <alpine.DEB.2.20.1803180933350.4709@luke-Latitude>
Message-ID: <7866BD9C-7445-4416-88AB-4CCA4CC0FBBE@oracle.com>


> 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]]



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