Re: [R] Dynamic Dictionary Data Type?

From: Thomas Lumley <>
Date: Fri 03 Jun 2005 - 01:53:11 EST

On Thu, 2 Jun 2005, hadley wickham wrote:

>> An environment is a hash table, and copying occurs only on modification,
>> when any language would have to copy in this context.
> Yes, I'm aware that copying only occurs on modification. However, it
> was my understanding that
> a <- list(a =1)
> a$b <- 4
> would create a new copy of a, whereas in Java say

It depends, but I was talking about *environments*, not lists, and

assign("c", 42, a)

wouldn't copy anything. Bill Venables had an article about environments for caching previously computed results in an early issue of R News.

         -thomas mailing list PLEASE do read the posting guide! Received on Fri Jun 03 01:58:00 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:21 EST