I am hoping to use the openSTARS package that relies on GRASS 7.0 within R. However, I do not understand how to proceed with the initial steps.

From: https://github.com/MiKatt/openSTARS

A functional installation of GRASS GIS (>=7.0) with installed add-ons r.stream.basins, r.stream.distance, r.stream.order and r.hydrodem is needed. These add-ons can be installed from within GRASS using the console and g.extension or in the GUI under 'Settings'/'Addons extensions'/'Install extensions from add-ons' under 'raster'.

Do I install GRASS as a stand-alone or do I install it from within R? How do I get to "GRASS using the console" (R's console or GRASS's console)? The vignette is extremely detailed and well-laid out after these points but it assumes we understand GRASS so I'm stuck.


1 Answer 1


To use GRASS modules from within R, first you need to install GRASS in your system. The 2nd step is to have the GRASS extensions installed from GRASS GUI interface or commandline. The GRASS add-ons that openSTARS going to use does not come pre-installed with GRASS. So you need to install it from the following menu inside GRASS:

enter image description here

The above step will open GRASS "Fetch and and install extensions" window. Then install the required add-ons mentioned in openSTAR one-by-one from the following window:

enter image description here

Once the required add-ons are installed, then you can follow the rest of the process described in openSTARS github page to use these modules from within R. There is a R library named 'rgrass7' for using any GRASS modules from R script/console directly but opnsSTARS might not need rgrass7.

For using openSTARS you need to define the GRASS executable path, so any of the standalone or OSGeo installation will be fine as long as you define the path of your GRASS executable correctly.

  • I'll give this a try later this week and come back if I have any questions. Commented Jan 27, 2021 at 15:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.