Terminal command to open RStudio

Is there a command I can use in the Terminal on a Mac to open RStudio?

open -na Rstudio

That works, great -- thanks! :slight_smile: . Do you know how I could open a specific file in the terminal inside RStudio, without opening anther instance of RStudio? Thanks again :smile:

If you only have one Rstudio instance running then open -a Rstudio file.Rmd should do the trick... if you have multiple running :grimacing: I haven't figured out how to control which it opens into. I think it defaults to whichever was opened first? Possibly something to do with the terminal running somewhat independently of the IDE? There is perhaps a clever way to identify which instance of Rstudio to send it to, but I'm unfortunately not that clever :stuck_out_tongue_winking_eye:

1 Like

:grinning: Thanks, Scott!

1 Like

An additional note for anyone using R projects. You can also open RStudio in your project with:

open myproject.Rproj

2 posts were split to a new topic: Is there a way to automate the running the R script after launching R studio