[R-sig-Geo] spgrass6 does not load any long

Martin Renner martin.renner at stonebow.otago.ac.nz
Mon Aug 29 18:31:29 CEST 2011


Thank you for the answer, Roger! Sys.getenv("GISRC") let to a tmp file, but that was a copy of the .grassrc6 in my home directory. Editing .grassrc6 fixed it and now GRASS and R can talk to each other again. 

Again, thank you for the help! 

Martin



On 28 Aug 2011, at 6:16 , Roger Bivand wrote:

> On Sat, 27 Aug 2011, Martin Renner wrote:
> 
>> Hi,
>> 
>> after starting R --vanilla within grass 6.4.1 on Debian amd64 squeeze, I get the following error message when calling
>>> library (spgrass6)
>> Loading required package: spgrass6
>> Error : .onLoad failed in loadNamespace() for 'spgrass6', details:
>> call: read.dcf(gisrc)
>> error: Line starting 't ...' is malformed!
> 
> The error message is clear, your .gisrc file is malformed. I suggest running in R before library(spgrass6):
> 
> gisrc <- Sys.getenv("GISRC")
> gisrc
> 
> to discover its name, and then examining the contents with, for example,
> 
> file.show(gisrc)
> 
> inside R. The keys and values should be arranged in the format described in ?read.dcf. Mine in a spearfish session is:
> 
> GISDBASE: /home/rsb/topics/grassdata
> LOCATION_NAME: spearfish60
> MAPSET: rsb
> MONITOR: x0
> GRASS_GUI: wxpython
> 
> for example. It may be that something has overwritten your gisrc file, so you may need to correct it. Within GRASS before starting R you can check it by saying:
> 
> cat $GISRC
> 
> Also look for any stale gisrc* files that may be being copied across when GRASS starts.
> 
> Hope this helps,
> 
> Roger
> 
>> 
>> I'm running the up-to-date versions of spgrass6, sp, etc. with proj4 and gdal libraries from Debian. R version is 2.13.0. Any pointers on how to resolve this would be much appreciated. Cheers,
>> 
>> Martin
>> 
>> 
>> 
>> Martin Renner					mrenner at gmx.com
>> Post-doctoral Fellow				phone: 907-226 4672
>> University of Washington			   or: 907-235 0728
>> School of Aquatic and Fishery Sciences		Seattle, USA
>> 
>> _______________________________________________
>> 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