Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

GRASS GIS : spgrass6 with Revolution R Enterprise


View products that this article applies to.

I would like to access GRASS GIS commands via Revolution R Enterprise. The following codes works fine through RStudio:

require(spgrass6) 
setwd("D:/Temp/testLsat2") 
loc <- initGRASS("C:/Program Files (x86)/GRASS GIS 6.4.3", home=getwd(), gisDbase="LSAT3", override=TRUE )

But get the following error when running the code through the R console from Revolution R:

Error in file(file, ifelse(append, "a", "w")) : 
cannot open the connection 
In addition: Warning messages: 
1: running command 'g.dirseps.exe -g "D:/Temp/testLsat2\.grassrc6"' had status 309 
2: running command 'g.dirseps.exe -g "LSAT3"' 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=file1948485237cb"' had status 309 
6: running command 'g.gisenv.exe "set=MAPSET=file194846673c18"' 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/file1948485237cb/PERMANENT/DEFAULT_WIND': No such file or directory


Answer : They  are using third party package that connect GIS system and for now we dont have GIS system available for testing and reproducing your error but the GRASS GIS bin directory needed to be removed from the system PATH. Everything is working well now. We can also get some information at 

http://r-sig-geo.2731867.n2.nabble.com/Linking-R-spgrass6-to-OSGEO4W-GRASS-GIS-installation-td7585204.html

↑ Back to the top


Keywords: kb

↑ Back to the top

Article Info
Article ID : 3103814
Revision : 1
Created on : 1/7/2017
Published on : 11/1/2015
Exists online : False
Views : 74