[GRASS-stats] Error when starting grass from R (grass installed thru osgeo4w)
Helmut Kudrnovsky
hellik at web.de
Sun Sep 16 07:25:55 PDT 2018
Veronica Andreo wrote
> Hello,
>
> 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.
>
> 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]
>
> First, I had to change the slashes from windows type, to linux type
> (because I got:
> Error: '\O' in an unrecognized escape in character string ""C:\O").
>
> After that, I get the following:
>
>> 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')
> Error in if (!compatible) { : argumento tiene longitud cero
> Además: Warning messages:
> 1: In system(paste("g.dirseps.exe -g", shQuote(Sys.getenv("GISRC"))), :
> comando ejecutado 'g.dirseps.exe -g "junk"' tiene estatus 309
> 2: In system(paste("g.dirseps.exe -g", shQuote(gisDbase)), intern = TRUE)
> :
> comando ejecutado 'g.dirseps.exe -g "C:/Users/RETA/Documents/grassdata"'
> tiene estatus 309
> 3: In dir.create(loc_path) :
> cannot create dir 'NA\nc_spm_08_grass7', reason 'No such file or
> directory'
> 4: In dir.create(paste(loc_path, "PERMANENT", sep = "/")) :
> cannot create dir 'NA\nc_spm_08_grass7\PERMANENT', reason 'No such file or
> directory'
> 5: In dir.create(paste(loc_path, mapset, sep = "/")) :
> cannot create dir 'NA\nc_spm_08_grass7\user1', reason 'No such file or
> directory'
> 6: In system(paste("g.version", get("addEXE", envir = .GRASS_CACHE), :
> comando ejecutado 'g.version.exe' tiene estatus 309
>
> Any hints? I also attach a screenshot with the message that appears (I
> cannot copy/paste the text in that message)
>
> Thanks much in advance!
> Vero
>
> [0] https://grasswiki.osgeo.org/wiki/R_statistics/rgrass7#GRASS_within_R
>
> _______________________________________________
> grass-stats mailing list
> grass-stats at .osgeo
> https://lists.osgeo.org/mailman/listinfo/grass-stats
>
> Rgui_2018-09-13_22-19-45.png (73K)
> <http://osgeo-org.1560.x6.nabble.com/attachment/5378245/0/Rgui_2018-09-13_22-19-45.png>
it's a missing dll.
Are you invoking R from inside the OSGeo4W command console?
-----
best regards
Helmut
--
Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Stats-f4049448.html
More information about the grass-stats
mailing list