> 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

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to