[GRASS-dev] R and GRASS integration

Steven Pawley dr.stevenpawley at gmail.com
Sun Jan 3 14:54:15 PST 2016


Dear GRASS developers,

I'm wondering what represents the most desirable approach to integrate R scripts into GRASS so that they are part of the FOSS community. It seems like the integration with R represents a fairly important component of GRASS, which relies on R for many geostatistical operations and machine learning algorithms. There are numerous publications that describe workflows using GRASS and R, but rarely are these publicly available. 

Like many R-GRASS users, I have a collection of R scripts that interact with GRASS to perform various workflows. I have debated about converting these to Python using Rpy2, although this package can be a difficult to install on all platforms and depends on specific versions of R and Python. I noticed that Moritz Lennert recently developed a GRASS add on which consists of simply writing out the R commands to a temporary script for R to run. Based on this, I have converted some of my scripts which include random forest classification on both raster and vector data, random forest presence prediction, and spectral separability so that they can be accessed directly from the GRASS GUI.

Does this represent a desirable or even acceptable approach for embedding R scripts into grass add ons, or is Rpy2 the 'official' approach. Also, there are other alternatives to Rpy2 like PypeR which have the both conveniences and inconveniences, so should these also be considered? Or should we look at having a feature like in QGIS processing where R scripts can be launched directly with GUI options?

Steve


More information about the grass-dev mailing list