[R-SIG-Mac] Using multiple CRAN R-versions for building binary packages in a single machine?
Reijo Sund
reijo.sund at helsinki.fi
Tue Apr 28 19:35:13 CEST 2015
> You can have as many version as you want, OS X is using the standard framework versioning scheme
> This means that you can use any version at a given time by simply changing the "Current" symlink.
> This applies to compilation as well - the CRAN R is setup correctly to compile the correct paths
> for each version. Note, however, that you cannot run different versions *at the same time*.
Thank you very much Simon, everything is working fine for me now!
I suggest that the information you provided will be included to the R-admin manual Chapter "4 Installing R under OS X". So the subchapter "4.3 Multiple versions" could be updated to something like:
- - -
4.3 Multiple versions under OS X
The installer will remove any previous version of the R framework which it finds installed. This can be avoided by using pkgutil --forget (see the previous section and a note on the installer, e.g. for the Maverics build use: pkgutil --forget org.r-project.R.mavericks.fw.pkg). However, note that different versions are installed under /Library/Frameworks/R.framework/Versions as 3.0, 3.1 and so on, so it is not possible to have different ‘3.x.y’ versions installed for the same ‘x’. Note also that you cannot run different versions at the same time.
If you want to switch the R version in use, change the symlink of ‘current’ version (e.g. ln -sfn 3.1 /Library/Frameworks/R.framework/Versions/Current). A small utility, Rswitch.app (available at http://r.research.att.com/#other), can also be used to change the ‘current’ version. However, this is of limited use if you are using R.APP, because R.APP is compiled against a particular version of R and will likely crash if switched to an earlier version. This may still allow you to e.g. build, check or test packages using a development version of R (installed with de-selecting R.APP) and then switch back to the release version.
- - -
Best wishes,
Reijo Sund
Centre for Research Methods,
Department of Social Research,
University of Helsinki,
Finland
More information about the R-SIG-Mac
mailing list