[R-sig-Geo] can't initiate Grass with initGRASS()

William McCoy wdmccoy at geo.umass.edu
Sat Aug 28 02:33:41 CEST 2010


I am using spgrass6, but I can't seem to initiate a grass session.  I 
managed to do this correctly months ago, but can't seem to now.  Here is 
my code and sessionInfo:

 > library(spgrass6)
Loading required package: sp
Loading required package: rgdal
Geospatial Data Abstraction Library extensions to R successfully loaded
Loaded GDAL runtime: GDAL 1.7.2, released 2010/04/23
Path to GDAL shared files: /usr/local/share/gdal
Loaded PROJ.4 runtime: Rel. 4.7.1, 23 September 2009
Path to PROJ.4 shared files: (autodetected)
Loading required package: XML
GRASS GIS interface loaded with GRASS version: (GRASS not running)
 > loc <- initGRASS(gisBase = "/usr/local/grass-6.4.0svn/", home = 
tempdir())
g.gisenv: symbol lookup error: g.gisenv: undefined symbol: G__no_gisinit
g.gisenv: symbol lookup error: g.gisenv: undefined symbol: G__no_gisinit
g.gisenv: symbol lookup error: g.gisenv: undefined symbol: G__no_gisinit
g.gisenv: symbol lookup error: g.gisenv: undefined symbol: G__no_gisinit
g.gisenv: symbol lookup error: g.gisenv: undefined symbol: G__no_gisinit
g.region: symbol lookup error: g.region: undefined symbol: G__gisinit
Error in if (file.exists(file) == FALSE) if (!missing(asText) && asText 
==  :
   argument is of length zero
Error in parseGRASS(cmd) : g.region not parsed

 > sessionInfo()
R version 2.11.1 (2010-05-31)
i386-redhat-linux-gnu

locale:
  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
  [5] LC_MONETARY=C              LC_MESSAGES=en_US.UTF-8
  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
  [9] LC_ADDRESS=C               LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] spgrass6_0.6-19 XML_3.1-1       rgdal_0.6-28    sp_0.9-66

loaded via a namespace (and not attached):
[1] grid_2.11.1    lattice_0.18-8 tools_2.11.1


Any ideas about what I am doing wrong?

Thanks, Bill

-- 
William D. McCoy
Geosciences
University of Massachusetts
Amherst, MA 01003



More information about the R-sig-Geo mailing list