[R] Hash table...

From: Worik R <worikr_at_gmail.com>
Date: Thu, 14 Apr 2011 18:44:53 +1200


To improve the efficiency of a process I am writing I would like to cache results. So I would like a data structure like a hash table.

So if I call Z <- f(Y) I can cache Z associated with Y: CACHE[Y] <- Z

I am stumped. I expected to be able to use a list for this but I cannot figure how....

cheers
Worik

        [[alternative HTML version deleted]]



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Thu 14 Apr 2011 - 06:56:46 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 14 Apr 2011 - 11:10:29 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive