<div dir="ltr"><div dir="ltr"><div>Hello, <br></div><div><br></div><div>I am preparing a one week GRASS GIS course and I mostly expect Windows users, so I recommend to install from OSGeo4W that allows to easily install also QGIS, msys (to get nice bash tricks) and other libraries that are then needed for some grass add-ons. <br></div><div><br></div><div>The last day of the course, I'll show the connection with R. Now, starting R within a grass session works as expected. But I get errors when trying to initialize GRASS (installed from OSGeo4W) from R console. I am following the instructions in the wiki [0]</div><div><br></div><div>First, I had to change the slashes from windows type, to linux type (because I got: <br><div>Error: '\O' in an unrecognized escape in character string ""C:\O"). <br></div><div><br></div><div>After that, I get the following:</div></div><div>


        
        <span></span><span style="font-family:monospace,monospace"><br></span></div><div><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')<br>Error in if (!compatible) { : argumento tiene longitud cero<br>Además: Warning messages:<br>1: In system(paste("g.dirseps.exe -g", shQuote(Sys.getenv("GISRC"))), :<br>comando ejecutado 'g.dirseps.exe -g "junk"' tiene estatus 309<br>2: In system(paste("g.dirseps.exe -g", shQuote(gisDbase)), intern = TRUE) :<br>comando ejecutado 'g.dirseps.exe -g "C:/Users/RETA/Documents/grassdata"' tiene estatus 309<br>3: In dir.create(loc_path) :<br>cannot create dir 'NA\nc_spm_08_grass7', reason 'No such file or directory'<br>4: In dir.create(paste(loc_path, "PERMANENT", sep = "/")) :<br>cannot create dir 'NA\nc_spm_08_grass7\PERMANENT', reason 'No such file or directory'<br>5: In dir.create(paste(loc_path, mapset, sep = "/")) :<br>cannot create dir 'NA\nc_spm_08_grass7\user1', reason 'No such file or directory'<br>6: In system(paste("g.version", get("addEXE", envir = .GRASS_CACHE), :<br>comando ejecutado 'g.version.exe' tiene estatus 309</span></div><div><br></div><div>Any hints? I also attach a screenshot with the message that appears (I cannot copy/paste the text in that message)<br></div><div><br></div><div>Thanks much in advance!</div><div>Vero</div><div><br></div><div>[0] <a href="https://grasswiki.osgeo.org/wiki/R_statistics/rgrass7#GRASS_within_R">https://grasswiki.osgeo.org/wiki/R_statistics/rgrass7#GRASS_within_R</a><br></div></div></div>