Dear Hadley,
Thank you very much for your interest in the question proposed.
The Con class is a Reference Class. P and k are from class listCon.
I provide in the following lines a little more detail in order to be able
to reproduce the case.
#Class declaration
gCon <- setRefClass("Con", fields=l
Dear Hadley and John,
My main interest in the question was to understand what was happening.
Thank you very much for your clarifications and the piece of code.
Manuel
El 11/05/11 18:32, "John Chambers" escribió:
>Good suggestion for this case.
>
>But the general problem is tricky. What abou
> 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
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
Hi Manuel,
The source code for copy is short and pretty readable, so I'd
encourage you to look at it:
> setRefClass("XXX")$copy
Class method definition for method copy()
function (shallow = FALSE)
{
def <- .refClassDef
value <- new(def)
vEnv <- as.environment(value)
selfEnv <- as.
2011/5/10 Manuel Castejón Limas :
> Dear all,
>
> I've just discovered the 'Reference Classes'.
> In a previous attempt ---a year ago--- to re-implement in a Object Oriented
> fashion the AMORE package using S4 classes I strongly felt the need of such
> capability. It's great to have the Reference