<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body smarttemplateinserted="true" text="#000000" bgcolor="#FFFFFF">
    <br>
    <br>
    <div class="moz-cite-prefix">On 13-01-16 14:42, Roger Bivand wrote:<br>
    </div>
    <blockquote
      cite="mid:alpine.LFD.2.20.1601131440280.5601@reclus.nhh.no"
      type="cite">On Wed, 13 Jan 2016, Helmut Kudrnovsky wrote:
      <br>
      <br>
      <blockquote type="cite">
        <blockquote type="cite"><a class="moz-txt-link-freetext" href="http://win-builder.r-project.org/KJJJkeazt7Sw/rgrass7_0.1-5.zip">http://win-builder.r-project.org/KJJJkeazt7Sw/rgrass7_0.1-5.zip</a>
          <br>
          <br>
          Could users of initGRASS() please check that the environment
          variables are
          <br>
          set correctly for addons? </blockquote>
        <br>
        <blockquote type="cite">sessionInfo()
          <br>
        </blockquote>
        R version 3.2.3 (2015-12-10)
        <br>
        Platform: x86_64-w64-mingw32/x64 (64-bit)
        <br>
        Running under: Windows 7 x64 (build 7601) Service Pack 1
        <br>
        <br>
        locale:
        <br>
        [1] LC_COLLATE=German_Austria.1252  LC_CTYPE=German_Austria.1252
        LC_MONETARY=German_Austria.1252 LC_NUMERIC=C [5]
        LC_TIME=German_Austria.1252 <br>
        attached base packages:
        <br>
        [1] stats     graphics  grDevices utils     datasets  methods  
        base <br>
        other attached packages:
        <br>
        [1] rgrass7_0.1-5 XML_3.98-1.3  sp_1.2-2 <br>
        loaded via a namespace (and not attached):
        <br>
        [1] grid_3.2.3      lattice_0.20-33
        <br>
        <br>
        <blockquote type="cite">library(rgrass7)
          <br>
        </blockquote>
        Lade nötiges Paket: sp
        <br>
        Lade nötiges Paket: XML
        <br>
        GRASS GIS interface loaded with GRASS version: (GRASS not
        running)
        <br>
        <br>
        <blockquote type="cite">initGRASS("C:/Program Files/GRASS GIS
          7.1.svn", home=tempdir(),
          <br>
          gisDbase="C:/grassdata", location="nc_spm_08", mapset="user1")
          <br>
        </blockquote>
        gisdbase    C:/grassdata location    nc_spm_08 mapset      user1
        rows        6 columns     8 north       222800 south      
        222740 west        642590 east        642670 nsres       10
        ewres       10 projection  +proj=lcc +lat_1=36.16666666666666
        +lat_2=34.33333333333334
        <br>
        +lat_0=33.75 +lon_0=-79 +x_0=609601.22 +y_0=0 +no_defs
        +a=6378137
        <br>
        +rf=298.257222101 +towgs84=0.000,0.000,0.000 +to_meter=1 <br>
        <blockquote type="cite">execGRASS("g.region",
          raster="elevation", align="elevation", flags="a")
          <br>
        </blockquote>
        <br>
        <blockquote type="cite">execGRASS("r.slope.aspect",
          elevation="elevation", slope="myslope",
          <br>
          aspect="myaspect")
          <br>
        </blockquote>
        <br>
        Expositions-Rasterkarte <myaspect> komplett.
        <br>
        Neigungs-Rasterkarte <myslope> komplett.
        <br>
        <blockquote type="cite">execGRASS("r.roughness.vector",
          elevation="elevation", slope="myslope",
          <br>
          aspect="myaspect", strength="vectorstrength")
          <br>
        </blockquote>
        ----
        <br>
        Check if input files exist ...
        <br>
        ----
        <br>
        Define default output names when not defined by user ...
        <br>
        ----
        <br>
        Calculate compass aspect values ...
        <br>
        ----
        <br>
        Calculate colatitude ...
        <br>
        ----
        <br>
        Calculate direction cosines ...
        <br>
        ----
        <br>
        Calculate sum of direction cosines ...
        <br>
        Calculating sum of X direction cosines ...
        <br>
        <br>
        Calculating sum of Y direction cosines ...
        <br>
        <br>
        Calculating sum of Z direction cosines ...
        <br>
        <br>
        ----
        <br>
        Calculate vector strength ...
        <br>
        ----
        <br>
        Calculate inverted Fisher's K parameter ...
        <br>
        ----
        <br>
        Result maps:
        <br>
        vectorstrength
        <br>
        elevation_fisher_1K_3x3
        <br>
        Calculations done.
        <br>
        ----
        <br>
        <br>
        <blockquote type="cite">execGRASS("r.reclass.area",
          input="zipcodes",
          <br>
          output="zipcode_larger2000ha", value=2000, mode="greater")
          <br>
        </blockquote>
        Generating a clumped raster file ...
        <br>
        Pass 1 of 2...
        <br>
        <br>
        Generating renumbering scheme...
        <br>
        <br>
        Pass 2 of 2...
        <br>
        <br>
        r.clump komplett. 16 clumps.
        <br>
        Generating a reclass map with area size greater than or equal to
        <br>
        2000.000000 hectares...
        <br>
        <br>
        Generating output raster map <zipcode_larger2000ha>...
        <br>
        <blockquote type="cite">
          <br>
        </blockquote>
        <br>
        it seems to work properly in:
        <br>
        <br>
        R version 3.2.3 (2015-12-10) -- "Wooden Christmas-Tree"
        <br>
        Copyright (C) 2015 The R Foundation for Statistical Computing
        <br>
        Platform: x86_64-w64-mingw32/x64 (64-bit)
        <br>
        <br>
        thanks!
        <br>
        <br>
      </blockquote>
      <br>
      Thanks very much for checking! Could someone please report on
      status for OSX, and corroborate my finding that it works for my
      source installed GRASS on Fedora - other Linux variants and
      installation mechanisms (Ubuntu etc. installed binary?? may vary.
      <br>
      <br>
      Best wishes,
      <br>
      <br>
      Roger
      <br>
    </blockquote>
    <br>
    <br>
    Hi Roger, <br>
    <br>
    thanks for this update, great! I just checked for Ubuntu 14.04. When
    running R from within a GRASS session, I can now use installed GRASS
    addons. Great! initGRASS doesn't seem to work though (I never use
    it, so if I am overlooking something, please let me know). See
    below:<br>
    <br>
    <pre>> library(rgrass7)
> initGRASS("/usr/local/grass7", home=tempdir())
sh: 1: g.gisenv: not found
sh: 1: g.gisenv: not found
sh: 1: g.gisenv: not found
sh: 1: g.gisenv: not found
sh: 1: g.gisenv: not found
sh: 1: g.version: not found
Error in system(paste("g.version", get("addEXE", envir = .GRASS_CACHE),  : 
  error in running command</pre>
    <pre>> sessionInfo()
R version 3.2.2 (2015-08-14)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04.3 LTS

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C    
 [3] LC_TIME=nl_NL.UTF-8        LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=nl_NL.UTF-8    LC_MESSAGES=en_US.UTF-8
 [7] LC_PAPER=nl_NL.UTF-8       LC_NAME=C
 [9] LC_ADDRESS=C               LC_TELEPHONE=C
 [11] LC_MEASUREMENT=nl_NL.UTF-8 LC_IDENTIFICATION=C       
attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     
other attached packages:
[1] rgrass7_0.1-5 XML_3.98-1.3  sp_1.2-1     
loaded via a namespace (and not attached):
[1] grid_3.2.2      lattice_0.20-33</pre>
    Best wishes,<br>
    <br>
    Paulo<br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <blockquote
      cite="mid:alpine.LFD.2.20.1601131440280.5601@reclus.nhh.no"
      type="cite">
      <br>
      <blockquote type="cite">
        <br>
        <br>
        -----
        <br>
        best regards
        <br>
        Helmut
        <br>
        --
        <br>
        View this message in context:
<a class="moz-txt-link-freetext" href="http://osgeo-org.1560.x6.nabble.com/Using-GRASS-addons-in-R-on-Windows-tp5244411p5244989.html">http://osgeo-org.1560.x6.nabble.com/Using-GRASS-addons-in-R-on-Windows-tp5244411p5244989.html</a><br>
        Sent from the Grass - Stats mailing list archive at Nabble.com.
        <br>
        _______________________________________________
        <br>
        grass-stats mailing list
        <br>
        <a class="moz-txt-link-abbreviated" href="mailto:grass-stats@lists.osgeo.org">grass-stats@lists.osgeo.org</a>
        <br>
        <a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/grass-stats">http://lists.osgeo.org/mailman/listinfo/grass-stats</a>
        <br>
      </blockquote>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
grass-stats mailing list
<a class="moz-txt-link-abbreviated" href="mailto:grass-stats@lists.osgeo.org">grass-stats@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/grass-stats">http://lists.osgeo.org/mailman/listinfo/grass-stats</a></pre>
    </blockquote>
    <br>
  </body>
</html>