Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

multiple independent R sessions in Mac OS X

Tags:

r

rstudio

I need to run multiple R sessions, and hope that they can be performed in different R sessions. In Windows, I am able to open an arbitrary number of R sessions, and run different codes in each session (both RGui and RStudio). However, in Mac OSX, neither R.app nor RStudio would allow me to open multiple independent sessions -- I have to wait until the first set of R codes are completed in order to run a second set of R codes.

Is there any solution in Mac OSX? This issues had bothered me long ago, so I'd like to hear your suggestions. Thanks!

like image 209
alittleboy Avatar asked Nov 02 '13 22:11

alittleboy


People also ask

Can you run multiple R sessions at once?

You can open both simultaneously, which will result in two rsessions. You can then open each script in each project, and execute each one separately. It is then on your OS to manage the core allocation.

How do I open a second RStudio?

Opening a New Session You can see all active sessions by clicking the “Sessions” button on the top toolbar: The drop down menu will list all active sessions and let you open individual sessions or all sessions simultaneously by clicking on the icon to open it up in a separate tab.

How do I open a new window in R?

There are two ways to open a new source window: Pop out an editor: click the Show in New Window button in any source editor tab. Tear off a pane: drag a tab out of the main window and onto the desktop; a new source window will be opened where you dropped the tab.


2 Answers

Thank you for all the suggestions. Here is a brief summary of the possible solutions:

  1. Using Terminal: Run: open -n /Applications/RStudio.app in Terminal
  2. Install Emacs and ESS which permit multiple sessions
  3. Duplicate the entire R.app package by option-dragging (and you can rename the copies)
  4. Run multiple rstudio sessions using projects
like image 184
alittleboy Avatar answered Sep 17 '22 15:09

alittleboy


Opens another instance of an application in OSX:

open -n -a "APPLICATION NAME"

In this case you'd just do:

open -n -a "rstudio"

CNET article source

like image 20
goldisfine Avatar answered Sep 20 '22 15:09

goldisfine