[R] Error installing ggplot2 package
marc_schwartz at me.com
Wed Jan 10 17:17:07 CET 2018
If I am reading the messages below correctly, it would seem that Amelia did install ggplot2.
However, what is not clear is the source and version of the ggplot2 package that she installed.
The message would suggest that she installed a version of ggplot2 that was built for R-devel, which is to be R version 3.5.0 and thus, is not compatible with the current release/patch versions of R.
Also, according to the NEWS file for R-devel:
specifically right at the top:
"• The default version for save(), saveRDS(), serialize() and similar has been changed to 3. Objects saved with version 3 are not readable by earlier versions of R.
This includes saved workspaces."
That might also explain the readRDS(pfile) related error message.
If Amelia downloaded the *wrong* (e.g. R-devel) Windows binary version of ggplot2 from CRAN (currently ggplot2_2.2.1.zip) with the intent to install it locally, for example, rather than just using:
as Bert notes below, that might explain the errors.
Amelia, can you provide more details?
> On Jan 10, 2018, at 10:40 AM, Bert Gunter <bgunter.4567 at gmail.com> wrote:
> Point of clarification:
> Packages other than those that are part of the "standard" r distro
> must first be "installed" from a package repository -- typically CRAN
> -- via the install.packages()* function before they can be accessed
> via the library() or require() function. Have you done this? See
> ?installed.packages if you are unsure.
> Also, R must know what libraries to look in for any packages to be
> loaded via the library() function. see ?library for possibly relevant
> help on specifying the location if needed.
> Finally, apologies if I am offbase on this; others may understand your
> error message better than I and give you a more appropriate response.
> *Or through a suitable GUI interface that call install.packages().
> Bert Gunter
> "The trouble with having an open mind is that people keep coming along
> and sticking things into it."
> -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
> On Tue, Jan 9, 2018 at 10:35 PM, Amelia Marsh via R-help
> <r-help at r-project.org> wrote:
>> DeaR Forum,
>> I am trying to install the library ggplot2.
>> Currently I am using following R version
>> R version 3.4.1 (2017-06-30) -- "Single Candle"Copyright (C) 2017 The R Foundation for Statistical ComputingPlatform: x86_64-w64-mingw32/x64 (64-bit)
>> However, when I try to install ggplot2 and few other packages, I am getting following error.
>>> library(ggplot2)Error: package or namespace load failed for ‘ggplot2’ in readRDS(pfile): error reading from connectionIn addition: Warning message:package ‘ggplot2’ was built under R version 3.5.0
>> I wonder about the R version 3.5.0 as I checked on the CRAN site, the latest R version is R 3.4.3. I have in fact tried installing older versions too, but the error message remains same. Please guide.
>> [[alternative HTML version deleted]]
>> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help