read GRASS6 from outside
Roger Bivand wrote:
On Thu, 13 Nov 2008, Patrick Giraudoux wrote:
Roger Bivand a ?crit :
On Thu, 13 Nov 2008, Patrick Giraudoux wrote:
Dear listers, I am using GRASS6 embedded within QGIS under Windows for teaching purpose. This prevents reading GRASS objects from R within GRASS (R cannot be launched within GRASS in this configuration).
Patrick, Could you explain why not? I can launch it, and I know others can, at least by: Plugins -> GRASS -> Open GRASS Tools -> shell and typing the full path to Rgui.exe at the shell prompt, for me: $ "C:/Program Files/R/R-2.8.0/bin/Rgui.exe" You may need to set the path to R_LIBS in user environment variables, or to add it to the command line in the GRASS shell prompt, or use .libPaths() within R, but beyond that, things should work, including file transfer etc. The startup message in the current release does say "GRASS not running" because QGIS does not set the GRASS_VERSION or LOCATION_NAME environment variables, but does set GISRC - I'll try to fix that.
This should be fixed in the version of the package just submitted to CRAN. It is worth noting, however, that it hasn't been tested on GRASS < 6.3, but works - giving the correct GRASS version and LOCATION - on Linux (of course!), Windows Cygwin, Windows native GRASS, and QGIS 0.11 GRASS plugin. The Windows native GRASS also needs the full path to Rgui.exe entered into the lower panel of the Output - GIS.m window, followed by -> Run. If there are any GRASS or QGIS developers online - might it be possible to put R on a button with the full path string somewhere in an editable option? Roger
I filed the request with the QGIS team since I'm active over there. Thanks for working out the details. Alex