[GRASS-stats] error initGRASS - rgrass7

Markus Neteler neteler at osgeo.org
Thu Jul 23 13:59:01 PDT 2015


On Wed, Jul 22, 2015 at 3:11 PM, Rainer M Krug <Rainer at krugs.de> wrote:
> 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.

We (especially Veronica) worked during the recent Community Sprint on
the Wiki pages

http://grasswiki.osgeo.org/wiki/R_statistics

to improve it, move out subchapters into separate pages etc.
The scope is to explain both directions which used to work with spgrass6.

Best
Markus

> 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
>
> _______________________________________________
> grass-stats mailing list
> grass-stats at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-stats


More information about the grass-stats mailing list