[GRASS-user] Need Help with R in GRASS

I run Rgui in GRASS and tried to run a simple command to see how GRASS works in R. I tried g.list type=vect. the format I used was:
doGRASS(“g.list”, parameters=list(type=“vect”))

The output was: >>

GRASS command: g.list.exe type=rast
chr “g.list.exe type=vector”

  • attr(*, “cmd”)= chr “g.list.exe”

Why I don’t get the results I get from running it in GRASS. (like the following)

POM
PsOnMain

Any idea?

Have a great one,

Mehrdad

···

Mehrdad Varedi

···

On 10/21/18 7:20 AM, Mehrdad Varedi wrote:

I run Rgui in GRASS and tried to run a simple command to see how GRASS works in R. I tried g.list type=vect. the format I used was:
doGRASS(“g.list”, parameters=list(type=“vect”))

The output was: >>

GRASS command: g.list.exe type=rast
chr “g.list.exe type=vector”

  • attr(*, “cmd”)= chr “g.list.exe”

Why I don’t get the results I get from running it in GRASS. (like the following)

Use execGRASS(…) instead.

The R command “doGRASS” does not return the output, just the command name that you called. Whereas execGRASS does print the command output. (Check ?doGRASS in R). You would use doGRASS in cases where you are creating a new vector or raster.

POM
PsOnMain

Any idea?

Have a great one,

Mehrdad


Mehrdad Varedi

_______________________________________________
grass-user mailing list
[grass-user@lists.osgeo.org](mailto:grass-user@lists.osgeo.org)
[https://lists.osgeo.org/mailman/listinfo/grass-user](https://lists.osgeo.org/mailman/listinfo/grass-user)
-- 
Micha Silver
Ben Gurion Univ.
Sde Boker, Remote Sensing Lab
cell: +972-523-665918

Thanks Micha, Problem solved!

···

Mehrdad Varedi