[GRASS-stats] Changes to execGRASS()

Roger Bivand Roger.Bivand at nhh.no
Sat Aug 20 13:25:53 EDT 2011


Following Rainer's talk at useR! 2011, I have made a number of changes to 
execGRASS() and other functions in spgrass6 - the code is committed to 
R-Forge project rspatial module spgrass6, and should be built this evening 
as a source package, with version 0.7-4 and revision 1121.

The changes are 1) to introduce central options for ignore.stderr and 
useGDAL; 2) to parse interface description parameters for defaults, and to 
supply these defaults for omitted parameters; 3) to permit parameters to 
be passed as ... in execGRASS() and doGRASS() instead of parameters=list() 
- either representation may be used, but not both.

This means that ... in execGRASS() is now used for GRASS parameters, so 
all of the arguments to system() - which previously received the ... 
arguments - have to be named and given explicitly, otherwise they will be 
passed to GRASS. In particular, the "input" argument to system() collides 
with input= parameters to GRASS - see ?execGRASS for system() argument 
names.

The committed code checks in spearfish for R 2.13.1 and R-devel with both 
the current release branch 6.4.2svn47586 and development trunk 
7.0svn47783. It would be very useful if others could try this spgrass6 
code to see how far existing scripts are affected.

The 0.7 series began with the introduction of a NAMESPACE, a requirement 
for the next release of R in October.

Thanks to Rainer for interesting suggestions!

Roger

-- 
Roger Bivand
Department of Economics, NHH Norwegian School of Economics,
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



More information about the grass-stats mailing list