<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi<div class=""><br class=""></div><div class="">The problem is the gisBase. it is the directory with the e.g. lib, bin directories. I am not using the GRASS App but installed from Home-brew, so I can’t help you there. Just look for general intro on how to use Grass in R on Mac.</div><div class=""><br class=""></div><div class="">Cheers,</div><div class=""><br class=""></div><div class="">Rainer</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 7 Sep 2017, at 13:19, Johannes Radinger <<a href="mailto:johannesradinger@gmail.com" class="">johannesradinger@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">Hi Rainer,<div class=""><br class=""></div><div class="">I used following commands and got following errors and output (using Rstudio). I also included now the output from sessionInfo() after loading "rgrass7":</div><div class=""><br class=""></div><div class=""><div class="">> library("rgrass7")</div><div class="">Loading required package: sp</div><div class="">Loading required package: XML</div><div class="">GRASS GIS interface loaded with GRASS version: (GRASS not running)</div><div class="">Warning message:</div><div class="">package ‘XML’ was built under R version 3.4.1 </div><div class="">> #<a href="https://grasswiki.osgeo.org/wiki/R_statistics/rgrass7" class="">https://grasswiki.osgeo.org/wiki/R_statistics/rgrass7</a></div><div class="">> </div><div class="">> sessionInfo()</div><div class="">R version 3.4.0 (2017-04-21)</div><div class="">Platform: x86_64-apple-darwin15.6.0 (64-bit)</div><div class="">Running under: macOS Sierra 10.12.6</div><div class=""><br class=""></div><div class="">Matrix products: default</div><div class="">BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib</div><div class="">LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib</div><div class=""><br class=""></div><div class="">locale:</div><div class="">[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8</div><div class=""><br class=""></div><div class="">attached base packages:</div><div class="">[1] stats graphics grDevices utils datasets methods base </div><div class=""><br class=""></div><div class="">other attached packages:</div><div class="">[1] rgrass7_0.1-9 XML_3.98-1.9 sp_1.2-4 </div><div class=""><br class=""></div><div class="">loaded via a namespace (and not attached):</div><div class=""> [1] minqa_1.2.4 MASS_7.3-47 compiler_3.4.0 Matrix_1.2-10 tools_3.4.0 Rcpp_0.12.11 splines_3.4.0 </div><div class=""> [8] nlme_3.1-131 grid_3.4.0 nloptr_1.0.4 lme4_1.1-13 lattice_0.20-35</div><div class=""><br class=""></div><div class="">> # initialisation and the use of North Carolina sample dataset</div><div class="">> initGRASS(gisBase = "/Applications/GRASS-7.3.app", home = tempdir(), </div><div class="">+ gisDbase = "/Users/Johannes_Radinger/Documents/GRASS-GIS/",</div><div class="">+ location = "nc_spm_08_grass7", mapset = "PERMANENT", SG="elevation",</div><div class="">+ override=TRUE)</div><div class="">sh: g.gisenv: command not found</div><div class="">sh: g.gisenv: command not found</div><div class="">sh: g.gisenv: command not found</div><div class="">sh: g.gisenv: command not found</div><div class="">sh: g.gisenv: command not found</div><div class="">sh: g.version: command not found</div><div class="">Error in system(paste("g.version", get("addEXE", envir = .GRASS_CACHE), : </div><div class=""> error in running command</div></div><div class=""><br class=""></div><div class="">######</div><div class=""><br class=""></div><div class="">cheers, </div><div class="">Johannes</div></div><div class=""><br class=""></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Thu, Sep 7, 2017 at 11:36 AM, Rainer Krug <span dir="ltr" class=""><<a href="mailto:rainer_krug@icloud.com" target="_blank" class="">rainer_krug@icloud.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="">Hi<div class=""><br class=""></div><div class="">How did you run these commands from R, which error did you get?</div><div class=""><br class=""></div><div class="">Could you provide a transcript of your errors?</div><div class=""><br class=""></div><div class="">Rainer</div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class=""><div class="h5"><div class="">On 7 Sep 2017, at 10:04, Johannes Radinger <<a href="mailto:johannesradinger@gmail.com" target="_blank" class="">johannesradinger@gmail.com</a>> wrote:</div><br class="m_1115039393101794419Apple-interchange-newline"></div></div><div class=""><div class=""><div class="h5"><div dir="ltr" class="">Hi,<div class=""><br class=""></div><div class="">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 (<a href="https://grasswiki.osgeo.org/wiki/R_statistics/rgrass7" target="_blank" class="">https://grasswiki.osgeo.org/<wbr class="">wiki/R_statistics/rgrass7</a>), 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.<wbr class="">app; i.e. using "open /Applications/GRASS-7.3.<wbr class="">app" opens my grass installation.</div><div class=""><br class=""></div><div class="">So I tried to initialize GRASS (North Carolina location - PERMANENT) from within R using the initGRASS() command:</div><div class=""><br class=""></div><div class=""><div class="">initGRASS(gisBase = "/Applications/GRASS-7.3.app", home = tempdir(), </div><div class=""> gisDbase = "/Users/Johannes_Radinger/<wbr class="">Documents/GRASS-GIS/",</div><div class=""> location = "nc_spm_08_grass7", mapset = "PERMANENT", SG="elevation",</div><div class=""> override=TRUE)</div></div><div class=""><br class=""></div><div class="">However I get following error(s):</div><div class=""><div class="">sh: g.gisenv: command not found</div><div class="">sh: g.gisenv: command not found</div><div class="">sh: g.gisenv: command not found</div><div class="">sh: g.gisenv: command not found</div><div class="">sh: g.gisenv: command not found</div><div class="">sh: g.version: command not found</div><div class="">Error in system(paste("g.version", get("addEXE", envir = .GRASS_CACHE), : </div><div class=""> error in running command</div></div><div class=""><br class=""></div><div class="">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?</div><div class=""><br class=""></div><div class="">Thanks and best regards,</div><div class="">Johannes</div><div class=""><br class=""></div></div></div></div>
______________________________<wbr class="">_________________<br class="">grass-user mailing list<br class=""><a href="mailto:grass-user@lists.osgeo.org" target="_blank" class="">grass-user@lists.osgeo.org</a><br class=""><a href="https://lists.osgeo.org/mailman/listinfo/grass-user" target="_blank" class="">https://lists.osgeo.org/<wbr class="">mailman/listinfo/grass-user</a></div></blockquote></div><br class=""></div></div></blockquote></div><br class=""></div>
</div></blockquote></div><br class=""><div class="">
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant-ligatures: normal; font-variant-position: normal; font-variant-caps: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant-ligatures: normal; font-variant-position: normal; font-variant-caps: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant-ligatures: normal; font-variant-position: normal; font-variant-caps: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">--</div><div class="">Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany)</div></div></div><div class=""><br class=""></div><div class="">University of Zürich</div><div class=""><br class=""></div><div class=""><span style="text-align: -webkit-auto;" class="">Cell: +41 (0)78 630 66 57</span></div><div class=""><br class=""></div><div class="">Fax (D): +49 - (0)3 21 21 25 22 44</div><div class=""><br class=""></div><div class="">email: <a href="mailto:Rainer@krugs.de" class="">Rainer@krugs.de</a></div><div class=""><br class=""></div><div class="">Skype: RMkrug</div></div>
</div>
<br class=""></div></body></html>