Skip to content
Prev 7112 / 29559 Next

spgrass6 and initGRASS

Here is the result:

library(spgrass6)

debug(initGRASS)
 > initGRASS("C:/OSGeo4W/bin",home="U:/Documents and 
Settings/pgiraudo/",override=T)

(...)

Browse[2]>
debug: gisrc <- system(paste("g.dirseps.exe -g", 
shQuote(Sys.getenv("WINGISRC"))),
    intern = TRUE)
Browse[2]> Sys.getenv("WINGISRC")
                                        WINGISRC
"U:/Documents and Settings/pgiraudo/\\.grassrc6"
Browse[2]> shQuote(Sys.getenv("WINGISRC"))
[1] "\"U:/Documents and Settings/pgiraudo/\\.grassrc6\""
Browse[2]> gisrc
Error: object 'gisrc' not found

Beforehand, the first time I run 
initGRASS("C:/OSGeo4W/bin",home="U:/Documents and 
Settings/pgiraudo/",override=T), I got:

initGRASS("C:/OSGeo4W/bin",home="U:/Documents and 
Settings/pgiraudo/",override=T)
Error in system(paste("g.dirseps.exe -g", 
shQuote(Sys.getenv("WINGISRC"))),  :
  g.dirseps.exe not found

Then, if I try the same commande on QGIS Metis, I got:
initGRASS("C:/Program Files/Quantum GIS/grass",home="U:/Documents and 
Settings/pgiraudo",override=T)
Error in Sys.setenv(GISRC = gisrc) : wrong length for argument


Best,

Patrick







Roger Bivand a ?crit :