Re: [R] Dynamic Dictionary Data Type?

From: hadley wickham <h.wickham_at_gmail.com>
Date: Fri 03 Jun 2005 - 01:09:07 EST

> 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

HashMap a = new HashMap();
a.put("a", 1);
a.put("b", 2);

wouldn't create a copy of a. (please bear in mind my java syntax is very rusty!)

Caching data implies updating at each step, thus possibly creating n copies of the list. Is that wrong?

Hadley



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Jun 03 01:16:39 2005

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