Recently I wanted to install an application on a Mac, but it required an old version of R (3.2). On Linux and Windows, that is easy, since you install the application on its own path. Now, on a Mac, you can do it as well, but it will require extra work if you build it from source. There is something better!!! Here I outline what you can do easily…
Note that this illustration assumes that you want R 3.2 & 3.3 on the same system and be able to run either of them when you choose.
- Let’s assume that you already installed R 3.3 by downloading it from CRAN.
- To install R 3.2, you will need to download an old version from CRAN old R
- Before installing R 3.2, run the following commands
sudo pkgutil --forget org.r-project.R.mavericks.fw.pkg
sudo pkgutil --forget org.r-project.R.mavericks.GUI.pkg
sudo pkgutil --forget org.r-project.R.mavericks.GUI64.pkg - Install R 3.2 by double clicking on *.pkg
- Now, download and install RSwitch (RSwitch link), which it will allow you to switch between R version by clicking on the R version of your like.
Sources:
Installing Multiple Version of R in parallel on the same machine – Mac OS X | R-bloggers
https://stat.ethz.ch/pipermail/r-sig-mac/2011-August/008534.html