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

Roger Bivand Roger.Bivand at nhh.no
Sun Jan 10 10:43:08 PST 2016


On Sat, 9 Jan 2016, Helmut Kudrnovsky wrote:

> taken from the GRASS GIS dev ML:
>
> https://lists.osgeo.org/pipermail/grass-dev/2016-January/078318.html
>
> "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?"
>
> https://lists.osgeo.org/pipermail/grass-dev/2016-January/078322.html
>
> "> 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?
>>

This is not seen by rgrass::parseGRASS(), but a section could be added to 
list bin/*.bat files in the GRASS_ADDON_BASE environment variable 
directory. Do users also install addons system-wide (there is an option in 
the GUI)? Where does install if the -s flag is given - do we need to look 
there too?

What happens to C/C++ Windows extensions, are they in the GRASS_ADDON_BASE 
\bin with an .exe extension?

Contributions welcome!

Roger

>
> 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"
>
> https://lists.osgeo.org/pipermail/grass-dev/2016-January/078327.html
>
> "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-tp5244411.html
> Sent from the Grass - Stats mailing list archive at Nabble.com.
> _______________________________________________
> grass-stats mailing list
> grass-stats at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-stats

-- 
Roger Bivand
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; fax +47 55 95 91 00
e-mail: Roger.Bivand at nhh.no
http://orcid.org/0000-0003-2392-6140
https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en
http://depsy.org/person/434412


More information about the grass-stats mailing list