Start R inside GRASS but keep the terminal prompt

I often run R from within GRASS GIS. For example using R as a scripting language to automate GIS analysis. Or to use statistical models in R on spatial data in GRASS.

I used to open R in the terminal. However, I am using more and more RStudio instead. This has one drawback. When opening RStudio in the terminal (or any other program for that matter), you cannot use that command prompt anymore.

The solution, as often, is very simple. If you want to get the prompt back after starting a job, just include the & sign at the end, e.g.,  type at th e command prompt

rstudio &

You can close the program the regular way. And if for some reason you wish to close the terminal window while still using the program, type at the command prompt:


This works on the Linux bash shell. I don’t know if this works in Windows as well. But if you want to know more about running R from within GRASS on Windows, you might want to check out this tread on the GRASS mailing list.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s