[GRASS-user] Running GRASS within R (Rstudio) on MacOS

Johannes Radinger johannesradinger at gmail.com
Thu Sep 7 01:04:55 PDT 2017


Hi,

I try to run GRASS73 within R (actually R-studio) using the rgrass7 library
on MacOS 10.12.6. I followed the instructions stated in the wiki (
https://grasswiki.osgeo.org/wiki/R_statistics/rgrass7), however some of the
commands were not working for me. For instance, "grass70 --config path"
(also with grass73 etc) does not work here, however I found the path to the
application which is: /Applications/GRASS-7.3.app; i.e. using
"open /Applications/GRASS-7.3.app" opens my grass installation.

So I tried to initialize GRASS (North Carolina location - PERMANENT) from
within R using the initGRASS() command:

initGRASS(gisBase = "/Applications/GRASS-7.3.app", home = tempdir(),
          gisDbase = "/Users/Johannes_Radinger/Documents/GRASS-GIS/",
          location = "nc_spm_08_grass7", mapset = "PERMANENT",
SG="elevation",
          override=TRUE)

However I get following error(s):
sh: g.gisenv: command not found
sh: g.gisenv: command not found
sh: g.gisenv: command not found
sh: g.gisenv: command not found
sh: g.gisenv: command not found
sh: g.version: command not found
Error in system(paste("g.version", get("addEXE", envir = .GRASS_CACHE),  :
  error in running command

So what I am doing wrong? Do I miss some arguments in my command or is this
related to my Mac environment? Any suggestion I should try to solve that
problem?

Thanks and best regards,
Johannes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20170907/83e91d36/attachment.html>


More information about the grass-user mailing list