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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

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

MacQueen, Don
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
>



--
Don MacQueen

Lawrence Livermore National Laboratory
7000 East Ave., L-627
Livermore, CA 94550
925-423-1062

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: failure to replayPlot() a recordedplot object saved in a previous session?

Paul Murrell-2
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
[hidden email]
http://www.stat.auckland.ac.nz/~paul/

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: failure to replayPlot() a recordedplot object saved in a previous session?

daroczig
It might worth checking out this nice workaround of JJ:
https://github.com/Rapporter/pander/blob/master/R/evals.R#L1135

Best,
Gergely


On 25 September 2013 02:35, Paul Murrell <[hidden email]> wrote:

> 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
> [hidden email]
> http://www.stat.auckland.ac.**nz/~paul/<http://www.stat.auckland.ac.nz/~paul/>
>
> ______________________________**________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/**listinfo/r-help<https://stat.ethz.ch/mailman/listinfo/r-help>
> PLEASE do read the posting guide http://www.R-project.org/**
> posting-guide.html <http://www.R-project.org/posting-guide.html>
> and provide commented, minimal, self-contained, reproducible code.
>

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] 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.