Re: [R] [R-sig-Geo] Plan to build Package to use GRASS from R

From: Roger Bivand <>
Date: Thu, 28 Feb 2008 08:29:08 +0100 (CET)

On Wed, 27 Feb 2008, Rainer M Krug wrote:

> Hi
> Sorry for crossposting, but I think this can be of interest for GRASS and R
> users.

Yes, please avoid cross-posting - the discussion ends up on many different lists and threading can break down if the threading implementation in mail clients and archives doesn't like cross-posting.

The only complete thread I have found is on Nabble at:

for the grass-dev list.

In summary, the problems are mostly those of appropriately quoting shell commands through system() across platforms. Those interested should follow the discussion on grass-dev.

The correct lists could be either here, or the grass-stats list; could Rainer post a summary to both (hopefully in-thread) on conclusion?


> I am planning to write a package to make the use of GRASS from R easier. The
> idea is to wrap the system call to execute the GRASS command into an R
> command of the same name.
> e.g:
> <- function(..., intern=TRUE, ignore.stderr=FALSE)
> {
> comm <- paste( " ", ..., sep="" )
> print(comm)
> system( comm, intern=intern, ignore.stderr=ignore.stderr )
> }
> My questions are:
> 1) Is this a good way of doing it, or is giving a named list to the function
> more usefull?
> 2) Is there a way to obtain easily all commands from GRASS and the
> parameters possible and required?
> Any ideas and comments welcome,
> Rainer

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

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Thu 28 Feb 2008 - 07:34:15 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 28 Feb 2008 - 08:30:16 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive