Re: [Rd] attributes of environments

From: Thomas Lumley <>
Date: Wed 05 Jul 2006 - 16:00:07 GMT

On Tue, 4 Jul 2006, Gabor Grothendieck wrote:

> In the code below, e is an environment which we copy to f and then
> add attributes to e. Now f winds up with the same attributes.
> In other words it seems that the attributes are a property of the
> environment itself and not of the variable. Thus it appears we
> cannot have two environment variables that correspond to the
> original environment but with different attributes.

No, we can't. The two variables are references to the same environment, so they are the same.

If you want the attributes to be copies rather than references then create a list with the environment as an element and put the attributes on the list.


Thomas Lumley			Assoc. Professor, Biostatistics	University of Washington, Seattle

______________________________________________ mailing list Received on Thu Jul 06 02:29:39 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 05 Jul 2006 - 18:27:14 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.