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

Rainer M Krug r.m.krug at gmail.com
Thu Feb 28 02:56:09 EST 2008


On 28/02/2008, Roger Bivand <Roger.Bivand at nhh.no> wrote:
>
> 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.


OK - I'll avoid it in the future and continue this thread on grass-dev.

The only complete thread I have found is on Nabble at:
>
>
> http://www.nabble.com/Plan-to-build-Package-to-use-GRASS-from-R-tt15712877.html#a15712877
>
> 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


I think I will leave it at the grass-dev list, altohough it concerns grass
and R - it is more a devel issue then for the grass-stats list.

Rainer post a summary to both (hopefully in-thread) on conclusion?


OK - I will do so as soon some ideas and further palns emerge.

If I have a working solution, would it be possible to include it into the
spgrass6 package?

Thanks

Rainer


Roger
>
>
> >
> > 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:
> > r.to.vect <- function(..., intern=TRUE, ignore.stderr=FALSE)
> >  {
> >    comm <- paste( "r.to.vect ", ..., 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
> e-mail: Roger.Bivand at nhh.no
>
>


-- 

-- 
Rainer M. Krug, Dipl. Phys. (Germany), MSc Conservation Biology (UCT)

Plant Conservation Unit Department of Botany
University of Cape Town
Rondebosch 7701
South Africa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-dev/attachments/20080228/2bf05f33/attachment.html


More information about the grass-dev mailing list