Skip to content

Install multiple versions of R on Mac

2 messages · Steven McKinney, Simon Urbanek

#
Hi Marius,

What I have found is that RSwitch does not work if you only have one instance of R.app in
your Applications folder.  RSwitch does not modify R.app in the Applications folder, so after
you switched back to R-2.13.? with RSwitch, the R-2.13 startup is interacting with the
R-2.14 R.app in some fashion that Simon Urbanek might be able to explain but which I
have not yet worked out.

When I needed both R-2.12.2 and R-2.13.1, I made a folder
called "temp" in Applications, then copied the R.app from R-GUI-5732-2.12-leopard_Leopard64.dmg 
to Applications/temp and renamed it R-2.12.2_64bit.app, then moved that to the
Applications folder.  Next I copied the R.app from R-GUI-5885-2.13-leopard-Leopard64.dmg
to Applications/temp, renamed it to R-2.13.1_64bit.app, then moved it to the Applications
folder.  Now after I use RSwitch, if I run the appropriate R-<version>.app the Mac R GUI
initialization and startup works.  See e.g. 

http://www.mail-archive.com/r-sig-mac at r-project.org/msg00559.html

R-GUI-5732-2.12-leopard_Leopard64.dmg and the like available from 
http://r.research.att.com/

Your R.app in the Applications directory is the one from the last R you installed,
which appears to be the current development version.  So rename R.app to
something such as R-2.14.0_devel_64bit.app.  Then reinstall R-2.13.1 or use the strategy
I outlined above, and get the R-2.13.1 R.app renamed to R-2.13.1_64bit.app

Then after you use RSwitch, run the appropriate R-<version>.app


HTH 

Steven McKinney
#
On Aug 15, 2011, at 7:24 PM, Steven McKinney wrote:

            
R.app is always tied to a particular R version, because it's compiled against R (the path to libR.dylib contains the version). So you can only use R.app with the version of R it was compiled against. RSwitch only makes one of the other frameworks "Current", it has no effect on the R.apps on your machine.

As Steven pointed out you have to move/copy your R.app/R64.app out of the way to keep them separate for each R version. Alternatively you can also download them separately from the R.research.att.com pages. It doesn't matter how you name them or where you put them. The installation process will keep your old R.apps if they are not in Applications (which is not standard on Mac OS X but very useful for having multiple R versions).

Cheers,
Simon