[R-sig-Geo] syntax problem with r.mapcalculator
Aubrey Moore
aubreymoore at guam.net
Tue Oct 5 22:49:01 CEST 2010
Thanks, Roger
Your suggested "incantation" is the correct syntax for Windows.
execGRASS("r.mapcalculator", flags = c("overwrite"),
parameters=list(outfile="result", amap="ddev",
formula="\"if(A<0,0,A)\""))
- Aubrey
On 10/5/2010 7:56 PM, Aubrey Moore wrote:
> I created a raster map, "R20101001", using v.surf.rst. The
> interpolation overshoots and dips below zero in a few areas. I'd like
> to use r.mapcalculator, called from spgrass6, to replace all negative
> values with zeros. But I can't seem to get the syntax right. The
> following fails and produces the error message: "The system cannot
> find the file specified."
>
> execGRASS("r.mapcalculator", flags = c("overwrite"),
> parameters=list(outfile="result", amap="R20100101",
> formula='if(A<0,0,A)'))
>
> I would appreciate it if anyone can spot the mistake.
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
More information about the R-sig-Geo
mailing list