From winstonchang1 at gmail.com  Tue Apr  3 20:17:11 2018
From: winstonchang1 at gmail.com (Winston Chang)
Date: Tue, 3 Apr 2018 13:17:11 -0500
Subject: [Rd] [FORGED] recordPlot/replayPlot not working with
 saveRDS/readRDS
In-Reply-To: <92ecddb0-a17f-080c-ecaa-5702342f9590@stat.auckland.ac.nz>
References: <CAFOpNVE7oyo1P_JUeQbXcO_YbabXRcMoogeV=3ULesoX5BdfdQ@mail.gmail.com>
 <92ecddb0-a17f-080c-ecaa-5702342f9590@stat.auckland.ac.nz>
Message-ID: <CAFOpNVGfKtQbxeCR5BtCfC9T3f8dZc4sgvDo1U6nESt0C_a5wg@mail.gmail.com>

On Mon, Apr 2, 2018 at 4:41 PM, Paul Murrell <paul at stat.auckland.ac.nz> wrote:
> Hi
>
> What you are doing "wrong" is loading a recordedplot into the same session
> that it was created in.  The saveRDS()/readRDS() works if you save in one R
> session and then read in a different R session.  The assumption is that if
> you are still in the same session that created the recordedplot you still
> have the recordedplot (e.g., you can just do replayPlot(r) instead of
> replayPlot(r2).  Is that a bad assumption ?
>
> Paul

For my particular case, the goal is to cache many plots to disk so
that they can be replayed later, but still in the same R session. The
plots may be replayed in the current session, and they may be replayed
in a future one. Using a disk cache seems like a straightforward way
to make the cached plots work for both cases. Also, the number of
plots is such that a memory-based cache could consume significant
amounts of memory.

-Winston



[Rd] [FORGED] recordPlot/replayPlot not working with saveRDS/readRDS
Winston Chang