[GRASS-user] mapcalculator error on grass through R (spgrass6)

Vaclav Petras wenzeslaus at gmail.com
Thu Oct 16 10:51:41 PDT 2014

On Wed, Oct 15, 2014 at 6:30 PM, Frederico Mestre <
mestre.frederico at gmail.com> wrote:

>> Hello all:
> I'm using grass through R, however I came across an error, while using a
> function that uses mapcalculator:
> Error in system(cmd0, intern = TRUE) : 'r.mapcalculator.exe' not found
> Error in parseGRASS(cmd, legacyExec = legacyExec) :
>   r.mapcalculator not found
> The right module for raster algebra is r.mapcalc.

r.mapcalculator is a sh script used by QGIS Processing and similar tools to
help with passing raster maps to GRASS and back. spgrass6 is not doing
anything like this as far as I know, so the standard r.mapcalc is the
module to use.

Perhaps the names are little confusing. Also the fact that r.mapcalculator
is sh script in GRASS GIS 7 is quite surprising.

Anyway, r.mapcalc should solve your problem.

I initiated the grass session by doing:
> initGRASS(gisBase = 'C:/Program Files (x86)/GRASS GIS 7.0.0beta1',
> home=tempdir(), override=TRUE)
> I can see that the maps are in the mapset, because when I do:
> execGRASS("g.mlist", parameters = list(type = "rast"))
> I see the list of map names.
> Any help?
> Already tried to re-install grass, and installed the last version of it.
> Thanks,
> Frederico
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20141016/4f7fd16b/attachment.html>

More information about the grass-user mailing list