[Rd] serializing recordedplot object

From: Jeroen Ooms <jeroen.ooms_at_stat.ucla.edu>
Date: Mon, 09 Jan 2012 00:47:29 -0800

I use recordPlot() to save plots to disk that I render later to a variety of formats. This works fine for base R plots and ggplot2 plots, and also used to work for lattice plots. However somewhere in version 2.14 things stopped working for lattice plots. Here is an example:

x <- recordPlot();
saveRDS(x, "myplot.rds");
y <- readRDS("myplot.rds");
Error: NULL value passed as symbol address

printing x works fine, but printing y either gives an error or prints an empty page. The problem seems to be related to serializing the recordedplot object, which contains a lot of memory pointers. Any tips or workarounds?

> sessionInfo()

R version 2.14.1 (2011-12-22)
Platform: i686-pc-linux-gnu (32-bit)


 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
 [7] LC_PAPER=C                 LC_NAME=C
 [9] LC_ADDRESS=C               LC_TELEPHONE=C

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] lattice_0.20-0

loaded via a namespace (and not attached): [1] grid_2.14.1

R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Mon 09 Jan 2012 - 08:49:41 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 10 Jan 2012 - 08:20:07 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive