I'm used to do: > cmd = "r.mapcalc 'delme=100'" > system(cmd) and works, but how could I do the equivalent using execGRASS() ? I've tried: > doGRASS(cmd) Error in parseGRASS(cmd) : r.mapcalc 'delme=100' not parsed > execGRASS(cmd) Error in parseGRASS(cmd) : r.mapcalc 'delme=100' not parsed I can always use paste() to make any cmd string, but seems to me that execGRASS() would be cleaner. Thanks Agus
execGRASS() for r.mapcalc?
2 messages · Agustin Lobo, Roger Bivand
On Thu, 19 Nov 2009, Agustin Lobo wrote:
I'm used to do:
cmd = "r.mapcalc 'delme=100'" system(cmd)
and works, but how could I do the equivalent using execGRASS() ?
You cannot. r.mapcalc does not provide an --interface-description XML self-definition. You have either to use system() as before (with different quoting reimes for different OS), or r.mapcalculator in execGRASS(). This problem is shared with other interfaces using --interface-description. Roger
I've tried:
doGRASS(cmd)
Error in parseGRASS(cmd) : r.mapcalc 'delme=100' not parsed
execGRASS(cmd)
Error in parseGRASS(cmd) : r.mapcalc 'delme=100' not parsed I can always use paste() to make any cmd string, but seems to me that execGRASS() would be cleaner. Thanks Agus
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at stat.math.ethz.ch 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: Roger.Bivand at nhh.no