[GRASS-stats] error initGRASS - rgrass7

Rainer M Krug Rainer at krugs.de
Wed Jul 22 06:11:03 PDT 2015


Hi Veronica,

Veronica Andreo <veroandreo at gmail.com> writes:

> Hi,
>
> I'm trying to run GRASS from R using:
>
> library(rgrass7)
> initGRASS(gisBase="/home/veroandreo/software/grass-7.0.svn",
>           home=tempdir(), gisDbase="/home/veroandreo/grassdata",
>           location="latlong_wgs84", mapset="clorofila", override=TRUE)

I assume you use Linux.

>
> but I get the following error:
>
> sh: g.gisenv: command not foundsh: g.gisenv: command not foundsh:
> g.gisenv: command not foundsh: g.gisenv: command not foundsh:
> g.gisenv: command not foundsh: g.version: command not foundError in
> system(paste("g.version", get("addEXE", envir = .GRASS_CACHE),  :
>   error in running command
>
>
> Am I lacking something or is the function broken?? How should I use it??

The easiest way of using R and GRASS GIS together, is starting GRASS GIS
and then in starting R in GRASS. This way, initGRASS() is not needed
anymore as the environment is already set up.

Are you sure that you gisBase is correct? Does GRASS work if you start
it?

Cheers,

Rainer

>
> Any help is appretiated :)
>
>
> Thanks much in advance,
>
> Vero
> _______________________________________________
> grass-stats mailing list
> grass-stats at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-stats

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

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :       +33 - (0)9 53 10 27 44
Cell:       +33 - (0)6 85 62 59 98
Fax :       +33 - (0)9 58 10 27 44

Fax (D):    +49 - (0)3 21 21 25 22 44

email:      Rainer at krugs.de

Skype:      RMkrug

PGP: 0x0F52F982
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 480 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/grass-stats/attachments/20150722/047d0aca/attachment.pgp>


More information about the grass-stats mailing list