Re: [R-sig-Geo] R + GRASS in win XP

7 messages Options
Embed this post
Permalink
Roger Bivand

Re: [R-sig-Geo] R + GRASS in win XP

Reply Threaded More More options
Print post
Permalink
On Sun, 26 Aug 2007, Roger Bivand wrote:

> On Sat, 25 Aug 2007, Michal Gallay wrote:
>
>> 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.
>
> 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"

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

>
> is relevant.
>
> Hope this helps,
>
> Roger
>
>>
>> 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: [hidden email]
>> www: www.qub.ac.uk/geog
>>
>> _______________________________________________
>> R-sig-Geo mailing list
>> [hidden email]
>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>
>
>

--
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: [hidden email]

_______________________________________________
statsgrass mailing list
[hidden email]
http://grass.itc.it/mailman/listinfo/statsgrass
Roger Bivand
Economic Geography Section
Department of Economics
Norwegian School of Economics and Business Administration
Helleveien 30
N-5045 Bergen, Norway
Markus Neteler-3

Re: Re: [R-sig-Geo] R + GRASS in win XP

Reply Threaded More More options
Print post
Permalink
Dear Roger,

On Sun, Aug 26, 2007 at 08:32:53PM +0200, 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.

wow, that's great! How much time does it take to percolate through CRAN?

Markus

------------------
ITC -> dall'1 marzo 2007 Fondazione Bruno Kessler
ITC -> since 1 March 2007 Fondazione Bruno Kessler
------------------

_______________________________________________
statsgrass mailing list
[hidden email]
http://grass.itc.it/mailman/listinfo/statsgrass
giohappy

Re: Re: [R-sig-Geo] R + GRASS in win XP

Reply Threaded More More options
Print post
Permalink
That's a great news! It's exactly what my Windows users collegues were asking for...

2007/8/26, Markus Neteler <[hidden email]>:
Dear Roger,

On Sun, Aug 26, 2007 at 08:32:53PM +0200, 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.

wow, that's great! How much time does it take to percolate through CRAN?

Markus

------------------
ITC -> dall'1 marzo 2007 Fondazione Bruno Kessler
ITC -> since 1 March 2007 Fondazione Bruno Kessler
------------------

_______________________________________________
statsgrass mailing list
[hidden email]
http://grass.itc.it/mailman/listinfo/statsgrass


_______________________________________________
statsgrass mailing list
[hidden email]
http://grass.itc.it/mailman/listinfo/statsgrass
Roger Bivand

Re: Re: [R-sig-Geo] R + GRASS in win XP

Reply Threaded More More options
Print post
Permalink
In reply to this post by Markus Neteler-3
On Sun, 26 Aug 2007, Markus Neteler wrote:

> Dear Roger,
>
> On Sun, Aug 26, 2007 at 08:32:53PM +0200, 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.
>
> wow, that's great! How much time does it take to percolate through CRAN?

It was submitted Sunday evening CET, so if we are lucky, the source will
get to CRAN on Monday, and the Windows binary package will be built
automatically about midday Tuesday CET.

The current source is on the Sourceforge r-spatial project, module
spgrass6. I've put an unofficial Windows binary on:

http://spatial.nhh.no/R/etc/spgrass6_0.4-1.zip

if anybody would like to risk trying it. I think that there are still
issues to be resolved, because R Windows system() is probably unaware that
it is talking to MSYS on a bash shell, rather than an unadorned Windows
command prompt. So far, quoting and paths seem fragile, but the examples
all work.

I'd be grateful for feedback. If we need any improvements before FOSS4G,
that should be OK, but best for a specific QGIS public release to avoid
any "moving target" issues.

Best wishes,

Roger

>
> Markus
>
> ------------------
> ITC -> dall'1 marzo 2007 Fondazione Bruno Kessler
> ITC -> since 1 March 2007 Fondazione Bruno Kessler
> ------------------
>
> _______________________________________________
> statsgrass mailing list
> [hidden email]
> http://grass.itc.it/mailman/listinfo/statsgrass
>

--
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: [hidden email]

_______________________________________________
statsgrass mailing list
[hidden email]
http://grass.itc.it/mailman/listinfo/statsgrass
Roger Bivand
Economic Geography Section
Department of Economics
Norwegian School of Economics and Business Administration
Helleveien 30
N-5045 Bergen, Norway
Agustin Lobo-2

Re: [R-sig-Geo] R + GRASS in win XP

Reply Threaded More More options
Print post
Permalink
In reply to this post by Roger Bivand
Roger,

Roger Bivand escribió:
> 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
>

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

Thanks

Agus
--
Dr. Agustin Lobo
Institut de Ciencies de la Terra "Jaume Almera" (CSIC)
LLuis Sole Sabaris s/n
08028 Barcelona
Spain
Tel. 34 934095410
Fax. 34 934110012
email: [hidden email]
http://www.ija.csic.es/gt/obster

_______________________________________________
statsgrass mailing list
[hidden email]
http://grass.itc.it/mailman/listinfo/statsgrass
Roger Bivand

Re: [R-sig-Geo] R + GRASS in win XP

Reply Threaded More More options
Print post
Permalink
On Fri, 31 Aug 2007, Agustin Lobo wrote:

> Roger,
>
> Roger Bivand escribió:
>>  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
>>
>
> what does "QGIS/msys/GRASS is supported" mean? Can R be used as a Qgis
> pluggin? Also for linux?
No, only that R will work when run in the GRASS Tools -> GRASS shell
inside QGIS under Windows with the MSYS-built GRASS modules. I do not know
whether the QGIS Linux version includes a similar GRASS Tools, but if so,
the shell ought to run R in the normal way. Running library(spgrass6)
gives access to GRASS.

Roger

>
> Thanks
>
> Agus
>

--
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: [hidden email]

_______________________________________________
statsgrass mailing list
[hidden email]
http://grass.itc.it/mailman/listinfo/statsgrass
Roger Bivand
Economic Geography Section
Department of Economics
Norwegian School of Economics and Business Administration
Helleveien 30
N-5045 Bergen, Norway
Agustin Lobo-2

Re: [R-sig-Geo] R (JGR)+ GRASS in QGIS linux ubuntu-feisty

Reply Threaded More More options
Print post
Permalink
It works fine on linux ubuntu feisty.
If R is run
using the JGR script (from the qgis/grasstools/grass terminal ) and then
spgrass6, I get a nice environment with separate terminals for R (JGR)
and grass. Too bad that, at least for me, the qgis/grasstools terminal
is not working correctly (cannot paste, cannot edit commands, does not
return the prompt after completion of sh scripts...). But this is
another story.

Agus

Roger Bivand escribió:

> On Fri, 31 Aug 2007, Agustin Lobo wrote:
>
>> Roger,
>>
>> Roger Bivand escribió:
>>>  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
>>>
>>
>> what does "QGIS/msys/GRASS is supported" mean? Can R be used as a Qgis
>> pluggin? Also for linux?
>
> No, only that R will work when run in the GRASS Tools -> GRASS shell
> inside QGIS under Windows with the MSYS-built GRASS modules. I do not
> know whether the QGIS Linux version includes a similar GRASS Tools, but
> if so, the shell ought to run R in the normal way. Running
> library(spgrass6) gives access to GRASS.
>
> Roger
>
>>
>> Thanks
>>
>> Agus
>>
>

--
Dr. Agustin Lobo
Institut de Ciencies de la Terra "Jaume Almera" (CSIC)
LLuis Sole Sabaris s/n
08028 Barcelona
Spain
Tel. 34 934095410
Fax. 34 934110012
email: [hidden email]
http://www.ija.csic.es/gt/obster

_______________________________________________
statsgrass mailing list
[hidden email]
http://grass.itc.it/mailman/listinfo/statsgrass