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

Helmut Kudrnovsky hellik at web.de
Tue Jan 12 07:44:35 PST 2016


>> xml1.R
>
>Typo in:
>
>         if (get("SYS", envir=.GRASS_CACHE) == "WinNat" && nchar(WN_bat)) {
>
>should be
>
>         if (get("SYS", envir=.GRASS_CACHE) == "WinNat"
>            && nchar(WN_bat) == 0) {
>
>With this r.roughness.vector is found correctly with the *.bat extension,
>for me anyway. The fresh Windows binary package from Winbuilder is here:
>
>http://win-builder.r-project.org/bEws3GQ47oph/rgrass7_0.1-4.zip

-----------------------------------
> utils:::menuInstallLocal()
Paket ‘rgrass7’ erfolgreich ausgepackt und MD5 Summen abgeglichen

> library(rgrass7)
Loading required package: sp
Loading required package: XML
GRASS GIS interface loaded with GRASS version: GRASS 7.1.svn (2016)
and location: nc_spm_08_grass7
-----------------------------------
> execGRASS("r.slope.aspect", elevation="elevation", slope="myslope",
> aspect="$
 100%
Aspect raster map <myaspect> complete
Slope raster map <myslope> complete

> execGRASS("r.roughness.vector", elevation="elevation", slope="myslope",
> aspe$
----
Check if input files exist ...
----
Define default output names when not defined by user ...
----
Calculate compass aspect values ...
 100%
----
Calculate colatitude ...
 100%
----
Calculate direction cosines ...
 100%
 100%
 100%
----
Calculate sum of direction cosines ...
Calculating sum of X direction cosines ...
 100%
Calculating sum of Y direction cosines ...
 100%
Calculating sum of Z direction cosines ...
 100%
----
Calculate vector strength ...
 100%
----
Calculate inverted Fisher's K parameter ...
 100%
----
Result maps:
vectorstrength
elevation_fisher_1K_3x3
Calculations done.
----
>
-----------------------------------
> execGRASS("r.reclass.area", input="zipcodes",
> output="zipcode_larger2000ha",$
Generating a clumped raster file ...
Pass 1 of 2...
 100%
Generating renumbering scheme...
 100%
Pass 2 of 2...
 100%
r.clump complete. 16 clumps.
Generating a reclass map with area size greater than or equal to
2000.000000 hectares...
 100%
 100%
Generating output raster map <zipcode_larger2000ha>...
-----------------------------------

confirmed, it works now. 

great, thanks!





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


More information about the grass-stats mailing list