[R-sig-Geo] r.mapcalc with spgrass6

Pinaud David pinaud at cebc.cnrs.fr
Tue Jul 6 16:52:06 CEST 2010


Dear all,

I'm trying to use the GRASS function "r.mapcalc" using R package 
"spgrass6", but I've got some trouble with it, I'm not even able to 
parse this function:

 > library(rgdal)
Le chargement a nécessité le package : sp
Geospatial Data Abstraction Library extensions to R successfully loaded
Loaded GDAL runtime: GDAL 1.7.1, released 2010/02/08
Path to GDAL shared files: C:/PROGRA~1/R/R-211~1.1/library/rgdal/gdal
Loaded PROJ.4 runtime: Rel. 4.7.1, 23 September 2009
Path to PROJ.4 shared files: C:/PROGRA~1/R/R-211~1.1/library/rgdal/proj

 > library(spgrass6)
Le chargement a nécessité le package : XML
GRASS GIS interface loaded with GRASS version: (GRASS not running)

 > parseGRASS("r.mapcalc")
Error : syntax error, unexpected '-', expecting NAME or STRING
Parse error  does not seem to be XML, nor to identify a file name
Erreur dans parseGRASS("r.mapcalc") : r.mapcalc not parsed

I tried to change the XML encoding by
 > setXMLencoding("latin1")
without success.

For example,
 > parseGRASS("g.region")
is correctly running, I've got the description of the function.

Otherwise, my calculus with "r.mapcalc" within GRASS 6.4.0 is correctly 
running.

 > sessionInfo()
R version 2.11.1 (2010-05-31)
i386-pc-mingw32

locale:
[1] LC_COLLATE=French_France.1252  LC_CTYPE=French_France.1252    
LC_MONETARY=French_France.1252
[4] LC_NUMERIC=C                   LC_TIME=French_France.1252   

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base    

other attached packages:
[1] spgrass6_0.6-16 XML_3.1-0       rgdal_0.6-27    sp_0.9-65     

loaded via a namespace (and not attached):
[1] grid_2.11.1    lattice_0.18-8 tools_2.11.1 

 > get("SYS", envir = .GRASS_CACHE)
[1] "WinNat"


Am I missing something? Any idea?

Thank you very much for your help and patience.

David


-- 
***************************************************
David PINAUD
Ingénieur de Recherche "Analyses spatiales"

Centre d'Etudes Biologiques de Chizé - CNRS UPR1934
79360 Villiers-en-Bois, France 
poste 485
Tel: +33 (0)5.49.09.35.58
Fax: +33 (0)5.49.09.65.26
http://www.cebc.cnrs.fr/

***************************************************




__________ Information from ESET Mail Security, version of virus signature database 5255 (20100706) __________

The message was checked by ESET Mail Security.
http://www.eset.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pinaud.vcf
Type: text/x-vcard
Size: 324 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20100706/cf437547/attachment.vcf>


More information about the R-sig-Geo mailing list