[R] failure to replayPlot() a recordedplot object saved in a previous session?

Paul Murrell paul at stat.auckland.ac.nz
Wed Sep 25 02:35:44 CEST 2013


Hi

Attempting to use a display list snapshot (as created by recordPlot()) 
between R sessions has always been strongly discouraged, but as of about 
R 3.0.0 it has become impossible (due to internal changes, which was 
part of the reason for strongly discouraging this in the first place).

Sorry to be the bearer of bad news.

Paul

On 09/13/13 10:54, MacQueen, Don wrote:
> I have the following experience.
>
> If I use, for example,
>     tmp <-  recordPlot()
> in a session, then immediately the saved plot replays successfully using
>     replayPlot()
> in the same session. But not in the next R session. See examples below,
> copy/pasted from my shell window.
>
> The first R session is brand new; no saved objects left over from a
> previous session.
>
> I also have the same experience with R 3.0.1 patched on a linux machine
> (RHEL).
>
>
> Is this a known or expected behavior?
>
> Thanks
> -Don
>
>
> #### R session #1
>
> mydir[42]% R
>
> R version 3.0.1 Patched (2013-08-13 r63562) -- "Good Sport"
> Copyright (C) 2013 The R Foundation for Statistical Computing
> Platform: x86_64-apple-darwin10.8.0 (64-bit)
>
> R is free software and comes with ABSOLUTELY NO WARRANTY.
> You are welcome to redistribute it under certain conditions.
> Type 'license()' or 'licence()' for distribution details.
>
>    Natural language support but running in an English locale
>
> R is a collaborative project with many contributors.
> Type 'contributors()' for more information and
> 'citation()' on how to cite R or R packages in publications.
>
> Type 'demo()' for some demos, 'help()' for on-line help, or
> 'help.start()' for an HTML browser interface to help.
> Type 'q()' to quit R.
>
>>
>> x11()
>> plot(1:2)
>> tmp <- recordPlot()
>> replayPlot(tmp)
>> q()
> Save workspace image? [y/n/c]: y
>
>
>
>
> #### R session #2
>
>
> mydir[43]% R
>
> R version 3.0.1 Patched (2013-08-13 r63562) -- "Good Sport"
> Copyright (C) 2013 The R Foundation for Statistical Computing
> Platform: x86_64-apple-darwin10.8.0 (64-bit)
>
> R is free software and comes with ABSOLUTELY NO WARRANTY.
> You are welcome to redistribute it under certain conditions.
> Type 'license()' or 'licence()' for distribution details.
>
>    Natural language support but running in an English locale
>
> R is a collaborative project with many contributors.
> Type 'contributors()' for more information and
> 'citation()' on how to cite R or R packages in publications.
>
> Type 'demo()' for some demos, 'help()' for on-line help, or
> 'help.start()' for an HTML browser interface to help.
> Type 'q()' to quit R.
>
> [Previously saved workspace restored]
>
>> ls()
> [1] "tmp"
>> class(tmp)
> [1] "recordedplot"
>> x11()
>> replayPlot(tmp)
> Error: NULL value passed as symbol address
>>
>> sessionInfo()
> R version 3.0.1 Patched (2013-08-13 r63562)
> Platform: x86_64-apple-darwin10.8.0 (64-bit)
>
> locale:
> [1] C
>
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods   base
>>
>
>
>

-- 
Dr Paul Murrell
Department of Statistics
The University of Auckland
Private Bag 92019
Auckland
New Zealand
64 9 3737599 x85392
paul at stat.auckland.ac.nz
http://www.stat.auckland.ac.nz/~paul/



More information about the R-help mailing list