<div dir="ltr"><div>Hi again, <br></div><div><br></div><div>So, I tested as suggested:</div><div>1. Open R console within OSGeo4W Shell, </div><div>2. <span style="font-family:monospace,monospace">library(rgrass7)</span></div><div>3. <span style="font-family:monospace,monospace">initGRASS(gisBase = 'C:/OSGeo4W64/apps/grass/grass-7.4.0', gisDbase = 'C:/Users/RETA/Documents/grassdata', location = 'nc_spm_08_grass7', mapset = 'user1', SG='elevation')</span></div><br>and I now get:<br><div>unused argument (gisDbase = 'C:/Users/RETA/Documents/grassdata')</div><div><br></div><div>anything else to test/set?</div><div><br></div><div>best,</div><div>Vero<br></div><div><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace"><br></span></span></div></div><br><div class="gmail_quote"><div dir="ltr">El dom., 16 sept. 2018 a las 23:15, Helmut Kudrnovsky (<<a href="mailto:hellik@web.de">hellik@web.de</a>>) escribió:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">>OK, thanks for confirming that OSGeo4W remains feasible for rgrass7; I don't<br>
have access. Does usability >include initGRASS()? This would be most fragile<br>
because environment variables are being set, and >condition on Windows and<br>
OSGeo4W.<br>
<br>
R within a GRASS session works quite well so far.<br>
<br>
did a fresh svn up of <br>
<br>
svn://<a href="http://r-forge.r-project.org/svnroot/spgrass" rel="noreferrer" target="_blank">r-forge.r-project.org/svnroot/spgrass</a><br>
<br>
and quickly screened pkg\rgrass7\R\initGRASS.R:<br>
<br>
e.g.<br>
<br>
        Sys.setenv(GRASS_PROJSHARE=paste(Sys.getenv("GISBASE"),<br>
            "\\proj", sep=""))<br>
<br>
AFAIK at least the GRASS7.4.x line doesn't use anymore an own copy of the<br>
PROJSHARE files; instead it uses the PROJ files itself; that's for all<br>
platforms (linux, MacOS, MS Windows, ...).<br>
<br>
e.g. in OSGeo4W 64bit it's defined as:<br>
<br>
SET OSGEO4W_ROOT=C:\OSGeo4W64<br>
set GRASS_PROJSHARE=%OSGEO4W_ROOT%\share\proj<br>
<br>
only in the standalone installer, it's still defined as:<br>
<br>
set GRASS_PROJSHARE=%GISBASE%\share\proj<br>
<br>
because it's bundled in the installer.<br>
<br>
e.g.<br>
<br>
            Sys.setenv(PATH=paste(Sys.getenv("GISBASE"), "\\extrabin;",<br>
                Sys.getenv("PATH"), sep=""))<br>
<br>
there is no C:\OSGeo4W64\apps\grass\grass-7.4.1, because all of the<br>
dependencies etc are living e.g. in <br>
C:\OSGeo4W64\bin, C:\OSGeo4W64\lib, ...<br>
<br>
I'm not sure about this one:<br>
<br>
[...]<br>
        Sys.setenv(GISBASE=gisBase)<br>
        if (missing(home)) home <- Sys.getenv("USERPROFILE")<br>
[...]<br>
        Sys.setenv(GISRC=paste(Sys.getenv("HOME"), "\\.grassrc7", sep=""))<br>
<br>
in winGRASS (standalone, OSGeo4W), the rc file lives in<br>
C:\Users\YourUserName\AppData\Roaming\GRASS7 and not in %USERPROFILE%<br>
<br>
and it seems around these lines:<br>
<br>
[...]<br>
        Sys.setenv(GISRC="junk")<br>
        cat("GISDBASE:", getwd(), "\n", file=Sys.getenv("GISRC"))<br>
        cat("LOCATION_NAME: <UNKNOWN>", "\n", file=Sys.getenv("GISRC"),<br>
            append=TRUE)<br>
        cat("MAPSET: <UNKNOWN>", "\n", file=Sys.getenv("GISRC"),<br>
            append=TRUE)<br>
        gisrc <- ifelse (use_g.dirseps.exe, system(paste("g.dirseps.exe -g",<br>
            shQuote(Sys.getenv("GISRC"))), intern=TRUE),<br>
            Sys.getenv("GISRC"))<br>
[...]<br>
<br>
initGRASS gets in trouble in OSGeo4W.<br>
<br>
<br>
<br>
-----<br>
best regards<br>
Helmut<br>
--<br>
Sent from: <a href="http://osgeo-org.1560.x6.nabble.com/Grass-Stats-f4049448.html" rel="noreferrer" target="_blank">http://osgeo-org.1560.x6.nabble.com/Grass-Stats-f4049448.html</a><br>
_______________________________________________<br>
grass-stats mailing list<br>
<a href="mailto:grass-stats@lists.osgeo.org" target="_blank">grass-stats@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/grass-stats" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/grass-stats</a></blockquote></div>