Hey,
first: Thanks for the quick answer! My OS would be windows 7 Enterprise, SP1.
It did however not work for me, because d.mon is not implemented in the GRASS Version 6.4.2 GUI,which I use, and when I try to start the command through R I get this:
> execGRASS("d.mon", start = "wx0")
FEHLER: no such monitor 'wx0'
FEHLER: Es gibt das Grafikfenster <wx0> nicht.
FEHLER: Es gibt das Grafikfenster <wx0> nicht.
Probleme beim Auswählen von wx0. Einmal versuche ich es noch...
Warnmeldung:
Ausführung von Kommando 'd.mon.exe start=wx0' ergab Status 1
which kind of translates to:
ERROR: there is no graphic window .
ERROR: there is no graphic window .
Problems chosing wx0. I will try once more…
Warnin:
Execution of command’d.mon.exe start=wx0’returned Status 1
Using the other commant anyway then gives:
> execGRASS("d.vect", parameters=list(map="due"),intern=T)
[1] "PNG: GRASS_TRUECOLOR status: TRUE" "PNG: collecting to file: map.png,"
[3] "GRASS_WIDTH=782, GRASS_HEIGHT=502"
which is the same as before.
I took the shape-files from here: http://www.ing.unitn.it/~grass/docs/tutorial_62_en/htdocs/esercitazione/geoprocessing/node1.html
but it does not really matter since the vector map itself is not important… i simply want it to be added to the location manager…
Is it good to send this reply to you only or should I, again, send it to the Mailing List in general? (my first question here…)
Greets,
Matthias
Gesendet: Dienstag, 02. April 2013 um 10:33 Uhr
Von: “Ahmadou Dicko” <dicko.ahmadou@gmail.com>
An: “matthias lauber” <kamallauber@gmx.de>
Betreff: Re: [GRASS-user] R and GRASS
Hi,
More info will be great for example. Which version of GRASS do you use and in which OS.
Using GRASS 7, I proceed like this :
1 - launch GRASS on the appropriate location/mapset
2 - launch R inside GRASS
3- in R do :
require(spgrass6)
open a window to plot first
execGRASS(“d.mon”, start = “wx0”)
execGRASS(“d.vect”, map=“due”)
uname -a : Linux dickoa 3.2.0-4-amd64 #1 SMP Debian 3.2.41-2 x86_64 GNU/Linux
GRASS version : GRASS 7.0.svn (2013)
R version : R version 3.0.0 RC (2013-03-30 r62448)
packageVersion(“spgrass6”)
[1] ‘0.7.15’
Hope this help
Hey folks,
I am somewhat new to GRASS and I am trying to get GRASS to talk with R in the way i want it to.
I am using the GRASS Version 6.4.2 and R 2.15.3 with RStudio.
My question is, how I can use execGRASS() from spgrass6 to do EXACTLY what GRASS would do?
When I try to simply display a vector-map like
library(spgarss6)
execGRASS(“d.vect”, parameters=list(map=“due”),intern=T)
it does not show add the vector map to my map-window but produces a .png-file… Any ideas?
Thank you in advance and happy after-easter,
Matthias
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user