Skip to content

install two versions of R on a Mac

2 messages · Steven McKinney, Ken Knoblauch

#
After installing the Mac GUI R:

If I navigate to the "Applications" directory in the Mac Finder file browser,
and <Control>-click (or right-click) on the R.app icon, a contextual menu
pops up - I select "Duplicate" and a second "R copy.app" is created.
I can then double-click to run that and have two copies of R up and running with
the Mac R gui interface.  

I have yet to uncover any problem with doing this,
Simon Urbanek can hopefully comment if there is any problem with this.

So this appears to be one way to allow multiple instances of the
same version of Mac GUI R to run.

Alternatively, if I run the following command from a "Terminal" window

$ /Applications/R.app/Contents/MacOS/R &
$ /Applications/R.app/Contents/MacOS/R &
$ /Applications/R.app/Contents/MacOS/R &

I get several instances of the same version of the Mac GUI R up and running.

So these are two methods I use to invoke multiple instances of various
programs on my Mac.  

Of course you need to be clear about where each instance is writing
its data, so for example if you quit and save the R session data objects
to the default .RData file, you will overwrite the .RData file from another
session instance as they will all have the same working directory - so you need to 
save results carefully.  Other than that, I have not seen any problems with 
running multiple instances in these ways.

If anyone knows of other potential problems, I'd appreciate hearing about them.

HTH

Steven McKinney

Statistician
Molecular Oncology and Breast Cancer Program
British Columbia Cancer Research Centre
#
Steven McKinney <smckinney <at> bccrc.ca> writes:
running with
and running.
see
https://stat.ethz.ch/pipermail/r-sig-mac/2008-April/004812.html