Skip to content

spgrass6, initGRASS() on MacOSX

2 messages · Johannes Radinger, Roger Bivand

#
Hello,

I want to use spgrass6 in an R session outside GRASS on Mac OSX. Therefore I want to use initGRASS to set some needed environmental variables etc.
initGRASS() needs gisBase as one parameter which is the direcotry path to the GRASS binaries. What is the standard path on Mac OS X? My GRASS.app is in /
/Applications/GRASS-6.5.app...

so I tried following two approaches so far without success:
Fehler in initGRASS("/Applications/GRASS-6.5", home = tempdir()) : 
  /Applications/GRASS-6.5 not found
Fehler in system(paste("g.version", get("addEXE", envir = .GRASS_CACHE),  : 
  Fehler bei der Ausf"uhrung des Kommandos

I don't know what is causing the problem in the second approach?
Does anyone know how to use initGRASS on Mac OS X in an R session outside GRASS correctly?

Best regards,
Johannes
--
#
On Tue, 14 Feb 2012, Johannes Radinger wrote:

            
Please ask on statgrass or grass-users with reference to:

http://grass.osgeo.org/wiki/Working_with_GRASS_without_starting_it_explicitly

saying how you installed OSX GRASS. The views that OSX and R or Python or 
other scripting languages have of the file system may well differ a good 
deal.

Roger