Dear all,

if somebody has trouble linking R to GRASS GIS in the OSGEO4W installation, here is a solution provided by Roger Bivand (thanks a lot Roger)!

Error message:
Error in file(file, ifelse(append, "a", "w")) : 
  cannot open the connection
In addition: Warning messages:
1: running command 'g.dirseps.exe -g "C:\DOKUME~1\ralfs\LOKALE~1\Temp\RtmpueCZM4\.grassrc6"' had status 309 
2: running command 'g.dirseps.exe -g "C:\DOKUME~1\ralfs\LOKALE~1\Temp\RtmpueCZM4"' had status 309 
3: running command 'g.gisenv.exe "set=GISDBASE= NA"' had status 309 
4: running command 'g.gisenv.exe "set=GISDBASE=NA"' had status 309 
5: running command 'g.gisenv.exe "set=LOCATION_NAME=file7447a6684f"' had status 309 
6: running command 'g.gisenv.exe "set=MAPSET=file744cd91da2"' had status 309 
7: running command 'g.gisenv.exe "set=GRASS_GUI=text"' had status 309 
8: running command 'g.version.exe' had status 309 
9: In file(file, ifelse(append, "a", "w")) :
  cannot open file 'NA/file7447a6684f/PERMANENT/DEFAULT_WIND': No such file or directory

Solution:
Add OSGEO4W/bin to the path to enable access to gdal110.dll

WPATH <- Sys.getenv("PATH")
WPATH1 <- paste("C:\\OSGeo4W\\bin", WPATH, sep=";")
# Note: Users with 64bit installation should put "C:\\OSGeo4W64\\bin"
#Sys.setenv(PATH=WPATH1)
initGRASS("C:/OSGeo4W/apps/grass/grass-6.4.3", tempdir(), override=TRUE, SG = mwidem_trans2)
# Note: Users with 64bit installation should put C:/OSGeo4W64/apps/grass/grass-6.4.3

Best regards
Ralf


	[[alternative HTML version deleted]]

