Skip to content

Loading of namespace on load of .Rdata (was strange behaviourof load)

1 message · Heather Turner

#
Apologies - I was not trying to correct you Brian, but to explore how the situation could arise. I'm sure you had a good idea why the namespace (or a reference to it) had been saved, but this was not clear to me and I thought, possibly not to others either.

Thanks for putting me right over parent environments vs. enclosures - again I was not trying to correct you with the point I made there, but to trace back where the reference to the namespace might have come from in Giovanni's case.

I think the issues raised are still of interest...

Heather
On Wed, 18 Jan 2006, Heather Turner wrote:
[Lines wrapped for legibility and R-help removed as it is not an 
appropriate list.]
Excuse me: environments do not have parents but enclosures according to 
?environment.

Of course, the environment of mod is itself an object, and so my statement 
holds true.  Saving a workspace saves all the objects (possibly as 
references) whether named or not.  I was fully aware that the namespace 
was likely to be up the environment tree of a named object when I chose my 
words carefully.
parent.env is a very confusing name.  To quote the draft R language 
definition:

 	`The parent.env function may be used to access the enclosure
 	of an environment.'

[...]