0 votes
1 view
in R Programming by (7.3k points)

I am trying to use Rpy2 and ggplot2 but I get an error. After some searching for the error online, I found that the error occurs because there are changes in the ggplot2 package that are not yet reflected in Rpy2.

So I now need to install an older version of ggplot2. Here is pseudo-code for what I want:

install.packages("ggplot2", version='0.9.1')

But install.packages does not have a version argument. How do I do it?

2 Answers

0 votes
by (25.4k points)

To install an older version of a package from source, do the following:

PackageUrl <- "http://cran.r-project.org/src/contrib/Archive/ggplot2/ggplot2_0.9.1.tar.gz"

 install.packages(PackageUrl, repos=NULL, type="source")

In some cases, you need to install Rtools so that you can compile the archived packages locally.

You can also use the devtools package to install an older version of a package as follows:


 install_version("ggplot2", version = "0.9.1", repos = "http://cran.us.r-project.org")


You can also use the remotes package as follows:


install_version("package_name", "0.1.1")

0 votes
Free sex dating in your city, here [url=https://bit.ly/2LtgS3Z]https://bit.ly/2LtgS3Z[/url]
Welcome to Intellipaat Community. Get your technical queries answered by top developers !