High quality statistic analysis in GRASS GIS is possible thanks to an interface to the most powerful statistics analysis package around: R(http://www.r-project.org).

There is support for:

  • The spgrass6 R addon package provides a convenient R ←→ GRASS GIS 6 interface
  • The rgrass7 R addon package provides a convenient R ←→ GRASS GIS 7 interface

Using R in GRASS GIS directly can has two meanings:

  • The first is that R is run “on top of” GRASS, transferring GRASS data to R to run statistical functions on the imported data as R objects in memory, and possibly transfer the results back to GRASS.
  • The second is to leave the data mostly in GRASS, and to use R as a scripting language “on top of” GRASS with execGRASS() – in this case, little data is moved to R, so memory constraints are not important, but R functionality is available

The installation of the R/GRASS interface is very easy and can be done by a single command (you probably have to be user “root” for this).
If your computer is connected to the Internet, you can install packages
within an R session. Start R and launch the command:


For Running R inside GRASS, first run grass and then inside it R.





Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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