[Rd] Helping out - simple bugs to help familiarize with R design, source, etc
Kevin B. Hendricks
kevin.hendricks at sympatico.ca
Fri Jun 2 20:03:20 CEST 2006
Hi Thomas,
> A key fact here is that NAMED(object) is 0 if the object is not
> (part of) an R variable, 1 if it is (part of) exactly one R
> variable, 2 if it is part of more than one R variable.
> The point is that NAMED=0 or 1 objects can be safely modified, but
> NAMED=2 have to be copied first (with the duplicate() function).
I am not sure if this question makes much sense since I am unsure of
what you mean by "object" here (is that a object oriented programming
idea of "object" or a more general term for some structure)
but ...
Can an "object" be an extended "structure" comprised of other
"objects" and if so do each of the substructure objects have their
own NAMED() attribute? If so, then if any of those sub objects
actually is part of another variable, does that force the NAMED()
attribute of the parent (or enclosing) object to have a value of 2
(forcing duplication before modification) for the entire thing?
If so, perhaps the NAMED() attribute of the enclosing object is
simply not being properly updated to be the maximum of all of the
NAMED() attributes of the sub objects? Isn't this what the Note: in
the bug report was talking about?
This might be fun to look at. But don't hold your breath for any
quick fixes! I still have a very steep learning curve to climb
before I can be of much use for anything other than build time issues.
Thanks,
Kevin
More information about the R-devel
mailing list