I’m getting a strange error when loading .Rdata produced on one OS and transferred to another. On a Windows machine I generate a large number of plots and store them in a .Rdata file. I then transfer them to a linux server running CentOS 5 and access them by loading the file and recalling the plot.
When I run the following lines on CentOS I get an error:
library(ggplot2)
load('mydata.Rdata')
p
Error in UseMethod("facet_train_layout") :
no applicable method for 'facet_train_layout' applied to an object of class "c('proto', 'environment')"
The Windows 7 OS that was used to produce this .Rdata file is using the following version of R:
R version 2.14.2 (2012-02-29) Copyright (C) 2012 The R Foundation for
Statistical Computing ISBN 3-900051-07-0 Platform:
x86_64-pc-mingw32/x64 (64-bit)
The CentOS system that produces an error is as follows:
R version 2.14.2 (2012-02-29) Copyright (C) 2012 The R Foundation for
Statistical Computing ISBN 3-900051-07-0 Platform: i686-pc-linux-gnu
(32-bit)
The ggplot2 version on both systems is ggplot2_0.9.2.1. This process has worked fine for the last six months, the only problem has been today due to an update and I don’t understand what is going wrong.
Both versions of R were upgraded to 2.14.2, as well as the ggplot package to ggplot2_0.9.2.1.
I presume the old version was 0.8.9 or below. There was a fundamental change with version 0.9.0:
See http://cran.r-project.org/web/packages/ggplot2/NEWS for more information