Skip to content
Prev 40214 / 63421 Next

Reference Classes copy(shallow=FALSE) unexpected behavior.

Good suggestion for this case.

But the general problem is tricky.  What about reference objects 
contained in attributes or slots of other objects, etc?  What is  needed 
for total copying is a switch in the low-level duplication code that 
says to copy reference objects.  It's also possible that one does NOT 
want all such objects copied.

For now, it may be that specialized copy() methods are needed for 
classes that have subsidiary reference objects inside non-reference objects.

John
On 5/11/11 6:37 AM, Hadley Wickham wrote: