multiple independent R sessions in Mac OS X

2019-03-08 16:25发布

问题:

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!

回答1:

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


回答2:

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



回答3:

I use this all the time on Mac OSX to open multiple Rgui sessions (similar to the Rstudio answer above): open -n /Applications/R.app/ You can do this multiple times for as many R sessions as you want.



标签: r rstudio