Skip to content
Prev 18313 / 29559 Next

spgrass6: execGRASS: make the output of the command an R object.

On Mon, 20 May 2013, Paulo van Breugel wrote:

            
With GRASS 6.4.2:

a <- execGRASS("r.univar", flags = "g", map = "elevation.dem", intern = 
TRUE)

works as before. Adding the fs= parameter causes the failure. You are 
using GRASS 7, in which fs= is separator=. In:

raster/r.univar/r.univar_main.c

only \\t, tab, space, and comma are defined as such, others seem to be 
accepted, but ";" is not. I think that the parameter is unused anyway in 
script-style output, but setting fs=";" certainly causes trouble.

Try without that parameter. Your observed difference in behaviour is not 
intended from the R side, and is caused by odd behaviour and interaction 
between parameters on the GRASS side in this GRASS module for your 
parameter settings. Other GRASS modules, and r.univar with different fs= 
settings, work as expected on Unix platforms, but under Windows, legacy 
execution is enforced anyway.

Hope this clarifies,

Roger