I'm using a package (ggmap) that doesn't work on R 3.6.1 (Windows), so I would like to install a previous version of R. Once the version is installed, I found how to force Rstudio to use it (through the options panel). The issue is I am not able to install a previous version. I've downloaded the directory (didn't do anything with it besides drag-and-drop into my R directory), but when I try to force Rstudio to use it, I get the following message: "This directory does not seem to contain a valid R installation". The parent directoy is the same that has the R 3.6.1, which works fine. Thanks for any help!
Asked
Active
Viewed 2,841 times
0
-
Perhaps you may want to see comments and answer of [this related question](https://stackoverflow.com/q/51982174/6574038). – jay.sf Jul 10 '19 at 08:39
1 Answers
2
I am using R version 3.6.0 (2019-04-26) and I was able to install the mentioned package:
install.packages('ggmap')
In my experience, sometimes I also think it's due to a version incompatibility when it isn't. For example, I might get a message similar to this:
Warning in install.packages :
package 'biomaRt' is not available (for R version 3.6.0)
To which most of the time the solution includes using setRepositories():
setRepositories()
Enter one or more numbers separated by spaces, or an empty line to cancel
1: 1 2 3 4 5 6 7 8
In this case, I added all of them just in case, which reassures that if the package exists and is available for my version, it will be installed (You may want to reset it again to a single repository, as it may slow the installation of other packages).
Edit: If you actually get the Error message I mentioned, you might be interested in looking at this answer if setRepositories() does not fix your issue.

Hart Radev
- 361
- 1
- 10