[GRASS-user] running /grass/script/v.db.* from R session

Glynn Clements glynn at gclements.plus.com
Fri Jan 1 04:28:05 EST 2010


Milton Cezar Ribeiro wrote:

> I am able to run all .exe commands of grass inside a R session.
> But now I need to run scripts (not .exe) like v.db.addcol
> and R is returning an error message.
> 
> > system(paste("v.db.addcol ANA_COD5_arstream_vect_",sprintf("%05d",
> sws),"_th0010 columns=","\"","ANA_COD5 varchar(15)","\"",sep=""))
> Warning message:
> In system(paste("v.db.addcol ANA_COD5_arstream_vect_", sprintf("%05d",  :
>   Impossible to run c:\OSGeo4W\apps\grass\GRASS-~1.0SV\scripts\VDB~1.ADD
> ANA_COD5_arstream_vect_07437_th0010 columns="ANA_COD5 varchar(15)"

First, ensure that $GISBASE/scripts isn't in the path if you're
running native Windows applications. Second, ensure that $GRASS_SH
contains the path to MSys' bash.

On Windows, each shell script in $GISBASE/scripts should have a
corresponding batch file in $GISBASE/bin. The batch file invokes the
script via %GRASS_SH%, which should contain the path to MSys' bash.

Also, start by trying to run scripts with arguments which don't
contain spaces or quotes. It's possible that we haven't got that case
correct yet (or that you need to do something within R to deal with
this).

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-user mailing list