[Rd] Why does slot<- duplicate its argument?

Renaud Gaujoux renaud at mancala.cbio.uct.ac.za
Fri Jun 17 13:35:38 CEST 2011


Hi,

is there a reason why `slot<-` should duplicate its argument?
I am under R 2.12.1.

Thank you,
Renaud

For example:

setClass('A', representation(data='matrix'))
a <- new('A')
x <- matrix(1,2,3)
tracemem(x)
slot(a, 'data') <- x


 

###
UNIVERSITY OF CAPE TOWN 

This e-mail is subject to the UCT ICT policies and e-mai...{{dropped:5}}



More information about the R-devel mailing list