Installation of ggplot2 in R 4.0.0.

Hello I am trying to install ggplot2 in R 4.0.0. patched. The package ‘ggplot2’ is already successfully unpacked and MD5 sums checked. However when I try to install the package from source I receive these errors:

Warning in install.packages :
package ‘C:/Users/HP/AppData/Local/Temp/RtmpkxPnNy/downloaded_packages/ggplot2_3.3.0’ is not available (for R version 4.0.0 Patched).

Could you please help because I am using Rtools40 which is also not compatible with the previous R versions. Many thanks!

I am afraid I have no answers, but only new questions:

  • what is the exact command that you use to install the package
  • what do you mean by ... I am trying to install ggplot2 in R 4.0.0. patched ?
    Is your R version patched? Because I am not aware of a special ggplot2 version for R 4.0.0 .
  • why do try to install the package from source ? Seeing the path name I assume you are working on the Windows platform and then I see no advantages in installing from source (unless you are very suspicious :grinning: )

In general I see a lot of questions on this forum related to the new R 4.0.0 release .
Maybe a forum member with knowledge of installing packages (so that excludes me :grinning: ) could write a summarizing article about the problem and solutions a starting/advanced user could encounter.
A reference to a such an article elsewhere is of course just a helpful.

Hi HanOostdijk,

Thank you for your response. I'm using the following command:

install.packages("C:/Users/HP/AppData/Local/Temp/RtmpkxPnNy/downloaded_packages/ggplot2_3.3.0", type = "source")

And getting this warning :

Warning in install.packages :
package ‘C:/Users/HP/AppData/Local/Temp/RtmpkxPnNy/downloaded_packages/ggplot2_3.3.0’ is not available (for R version 4.0.0 Patched).

What do you think could be the problem? Thanks again. Cheers!

I see you only answer the first question :sob:

I have no experience with installing packages from a local file as you try to do.

Reading the documentation of the install.packages function (as I advise you to do) I see that the first argument is a package name unless you supply the argument repos=NULL .
If look carefully at the warning you will see indeed that it complains about the package 'C:/Users/...' and that is indeed no package name.

But unless you have special considerations I advise you to install directly from a CRAN mirror (the standard way) or from a GitHub repository.

This is not a valid source file, this is the temp folder where the binary gets saved during the installation process, as @HanOostdijk said, unless you have a good reason for trying to install from a file, you should install from CRAN and you can still force compilation by setting type = "source"

install.packages("ggplot2", type = "source")

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.