[GRASS-dev] Using GRASS addons in R on Windows

Helmut Kudrnovsky hellik at web.de
Fri Jan 8 02:34:34 PST 2016


pvanbosgeo wrote
> On Fri, Jan 8, 2016 at 10:39 AM, Helmut Kudrnovsky <

> hellik@

> > wrote:
> 
>> pvanbosgeo wrote
>> > In Windows running R from within GRASS (latter installed via OSGeo4W)
>> > works fine, except that it can't seem to find the GRASS addons I
>> > installed (with g.extension), not using rgrass7 nor directly using
>> > system(). On Linux this is no problem, I can run any installed addon.
>> > Any ideas how to solve this?
>>
>> what does echo %PATH% in the osgeo4w shell within the winGRASS session
>> print?
>>
>> is the e.g. C:\Users\xy\AppData\Roaming\GRASS7\addons\bin included?
>>
> 
> The following is included in the PATH:
> C:\OSGeo4W\apps\grass\grass-7.0.2\lib
> C:\OSGeo4W\apps\grass\grass-7.0.2\bin
> C:\Users\Jeannette\AppData\Roaming\GRASS7\addons\bin
> C:\OSGeo4W\apps\msys\bin
> C:\OSGeo4W\bin;
> C:\WINDOWS\system32
> C:\WINDOWS
> C:\WINDOWS\WBem
> C:\OSGeo4W\apps\msys\bin
> C:\OSGeo4W\apps\Python27\Scripts;
> C:\Program Files\RStudio\bin
> 
>>
>>
>> -----
>> best regards
>> Helmut
>> --

a quick test here with a py and an exe addon:

r.basin.py

> execGRASS("r.basin", map="elevation", map="elevation", prefix="v",
> coordinates="637500.0,221750.0", dir="C:\tmp", threshold=1000)
Error in system(cmd0, intern = TRUE) : 'r.basin.exe' not found
Error in parseGRASS(cmd, legacyExec = legacyExec) : r.basin not found

r.stream.order.exe

> execGRASS("r.sream.order")
Error in system(cmd0, intern = TRUE) : 'r.sream.order.exe' not found
Error in parseGRASS(cmd, legacyExec = legacyExec) :
  r.sream.order not found

so maybe a question for the GRASS Statistics mailing List?




-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Using-GRASS-addons-in-R-on-Windows-tp5244240p5244257.html
Sent from the Grass - Dev mailing list archive at Nabble.com.


More information about the grass-dev mailing list