[R] Dynamic Dictionary Data Type?
hadley wickham
h.wickham at gmail.com
Thu Jun 2 17:09:07 CEST 2005
> 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
More information about the R-help
mailing list