Skip to content

Error installing ggplot2 package

3 messages · Amelia Marsh, Bert Gunter, Marc Schwartz

#
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.
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.
Regards
Amelia
#
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().

Cheers,
Bert
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:
#
Hi,

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:

  http://stat.ethz.ch/R-manual/R-devel/doc/html/NEWS.html

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:

 install.packages("ggplot2")

as Bert notes below, that might explain the errors.

Amelia, can you provide more details?

Regards,

Marc Schwartz