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.
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.