See:
http://finzi.psych.upenn.edu/R/Rhelp02a/archive/83547.html
On 12/13/06, Tamas K Papp [EMAIL PROTECTED] wrote:
Hi,
I am trying to find an elegant way to compute and store some
frequently used matrices on demand. The Matrix package already uses
something like this for storing
Hi,
I am trying to find an elegant way to compute and store some
frequently used matrices on demand. The Matrix package already uses
something like this for storing decompositions, but I don't know how
to do it.
The actual context is the following:
A list has information about a basis of a
the idea you are considering is also, at times, referred to as
memoizing. I would not use a list, but rather an environment, and
basically you implement something that first looks to see if there is a
value, and if not, compute and store. It can speed things up a lot in
some examples (and slow
On Wed, Dec 13, 2006 at 03:05:46PM -0800, Robert Gentleman wrote:
e1 = new.env(hash=TRUE)
e1[[1]] = whateveryouwant
ie. just transform to characters, but I don't see why you want to do
that - surely there are more informative names to be used -
Because they are derivatives, and best
e1 = new.env(hash=TRUE)
e1[[1]] = whateveryouwant
ie. just transform to characters, but I don't see why you want to do
that - surely there are more informative names to be used -
Tamas K Papp wrote:
Hi Robert,
Thanks for your answer. I would create and environment with
new.env(), but
Tamas K Papp [EMAIL PROTECTED] writes:
On Wed, Dec 13, 2006 at 03:05:46PM -0800, Robert Gentleman wrote:
e1 = new.env(hash=TRUE)
e1[[1]] = whateveryouwant
ie. just transform to characters, but I don't see why you want to do
that - surely there are more informative names to be used -
I use the R.oo Object class for what has been suggested previously.
The Object class can be thought of as utility wrapper class for
environments (actually environments gained much of its behavior some
time ago when $ etc was being mapped to get() calls).
For caching to file, take a look at the