Description Usage Arguments Details Author(s) See Also
Manually setup existing reference objects– rarely used explicitly.
1 | setup.mcache( envir, fpath, refs)
|
envir |
environment or position on the search path. |
fpath |
directory where "obj*.rda" files live. |
refs |
which objects to handle– all names in the |
Creates an active binding in envir
for each element in refs
. The active binding for an object myobj
will be a function which keeps the real data in its own environment, reading and writing it as required. Writing a new value will give attr( envir, "mcache")[ "myobj"]
a negative sign. This signals that the "obj*.rda" file needs updating, and the next Save
(or move
or cd
) command will do so. [The "*" is the absolute value of attr( envir, "mcache")[ "myobj"]
.] One wrinkle is that the "real data" is initially a promise
created by delayedAssign
, which will fetch the data from disk the first time it is needed.
Mark Bravington
mlazy
, makeActiveBinding
, delayedAssign
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.