Skip to content

R + GRASS in win XP

4 messages · Michal Gallay, Roger Bivand, Agustin Lobo

#
Dear R Users,

recently I've attempted to run R with GRASS from QGIS GRASS shell in 
Windows XP. It was my first try and didn't work.

Would you know if it is actually possible to run R from GRASS shell in 
windows environment?

I launched GRASS Shell from QGIS menu, which works via Mingw32 navigated 
to R directory, successfully started R from GRASS Shell and loaded spgrass6 
package in R.

The following "system()" R command didn't work for GRASS commands. I 
suspect it is related to Mingw32 emulator, but to be honest I haven't got 
yet to deep into UNIX-Windows programs.

Thank you very much for any hints for steps forward.

Michal

--
Michal Gallay

Postgraduate Research Student
School of Geography, Archaeology and Palaeoecology
Queen's University
Belfast BT7 1NN
Northern Ireland

Tel: +44(0)2890 273929
Fax: +44(0)2890 973212
email: mgallay01 at qub.ac.uk
www: www.qub.ac.uk/geog
#
On Sat, 25 Aug 2007, Michal Gallay wrote:

            
Until very recently, the QGIS/GRASS combination changed so often that it 
wasn't feasible to try to make any interface work. The solution was to 
read and write temporary files manually.

In order to make progress, the exact QGIS release (0.8.1?), and R output 
from sessionInfo() is needed, as well as your commands on (say) spearfish, 
and the verbatin error message and th output of traceback(). My guess is 
that the OS is being recognised in R as "windows", and that file paths are 
being constructed for Cygwin (which works), and which is currently the 
only style available. Almost certainly there are PATH issues too, that is 
that GRASS program executables are not being found, but without more 
information, it is difficult to check.

It is possible that the 0.8.1 release note for Windows:

"If you install QGIS in a path containing spaces (for example "C:\Program 
Files\Quantum GIS") you may experience problems with certain features, in 
particular the GRASS toolbox functions"

is relevant.

Hope this helps,

Roger

  
    
#
On Sun, 26 Aug 2007, Roger Bivand wrote:

            
It was a combination of path variables with spaces and the apparent need 
to call GRASS commands with *.exe extensions from within R in the GRASS 
shell under GRASS Tools (QGIS 0.8.1). From spgrass6-0.4-1, QGIS/msys/GRASS 
is supported - package revision just submitted to CRAN.

Roger

  
    
4 days later
#
Roger,

Roger Bivand escribi?:
what does "QGIS/msys/GRASS is supported" mean? Can R be used as a Qgis 
pluggin? Also for linux?

Thanks

Agus