[R-sig-Geo] spgrass6 and InitGrass

Roger Bivand Roger.Bivand at nhh.no
Thu Oct 6 15:19:25 CEST 2011


On Thu, 6 Oct 2011, Tomislav Hengl wrote:

>
> I'm having problems using GRASS 6.4.1 from R under windows 7. I've installed 
> GRASS and then loaded spgrass6 and tried:
>
>> library(spgrass6)
> Loading required package: XML
> GRASS GIS interface loaded with GRASS version: (GRASS not running)
>> GRASS <- shortPathName(utils::readRegistry("SOFTWARE\\WOW6432NODE\\GRASS 
> 6.4.1")$InstallPath)
> > GRASS
> [1] "C:\\PROGRA~2\\GRASS6~1.1"
> > initGRASS(gisBase=GRASS, home=tempdir())
> Error in initGRASS(gisBase = GRASS, home = tempdir()) :
>   Platform variant  not supported

This means that we need to check deeper. What do:

.Platform$OS.type
Sys.getenv("OSTYPE")
library(spgrass6)
get("SYS", envir=spgrass6:::.GRASS_CACHE)

report? If the first is the string "windows", and the second is "", the 
internal variable get("SYS", envir=spgrass6:::.GRASS_CACHE) is set to 
"WinNat". I suspect that one or other of these doesn't hold, and that SYS 
isn't being set to "WinNat" - on OSX and Linux, it is set to "unix"; 
"msys" and "cygwin" also exist, but are not supported for initGRASS(). I 
only have access (now) to 32-bit XP.

Roger


>
> > paste(R.version$version.string, Sys.info()[["sysname"]], 
> Sys.info()[["release"]])
> [1] "R version 2.12.2 (2011-02-25) Windows 7 x64"
>> sessionInfo()[["otherPkgs"]][["spgrass6"]][["Version"]]
> [1] "0.7-4"
>
> (sorry Roger, it probably means that you have to update the package :(
>
> T. Hengl
> http://www.wewur.wur.nl/popups/vcard.aspx?id=HENGL001
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

-- 
Roger Bivand
Department of Economics, NHH Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no



More information about the R-sig-Geo mailing list