[GRASS-stats] error initGRASS - rgrass7
Veronica Andreo
veroandreo at gmail.com
Mon Aug 3 16:17:01 PDT 2015
Hi Markus, Rainer, all,
Thanks a lot for the help! :)
I've now completed the update of:
http://grasswiki.osgeo.org/wiki/R_statistics/rgrass7#GRASS_within_R
Cheers,
Vero
ps: I insist it would be awesome to also have support to read/write
spatio-temporal raster datasets (strds) in rgrass7 :)
2015-07-31 11:56 GMT-03:00 Markus Neteler <neteler at osgeo.org>:
> Hi,
>
> On Fri, Jul 24, 2015 at 9:47 AM, Rainer M Krug <Rainer at krugs.de> wrote:
> > Markus Neteler <neteler at osgeo.org> writes:
> >
> >> 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 found
>
> so, I found the trick:
>
> In the first place, find out the path to the GRASS GIS library. This
> can be easily done with the following command (still outside of R; or
> through a system() call inside of R):
>
> grass70 --config path
>
>
> It may report something like:
> /home/veroandreo/software/grass-7.0.svn/dist.x86_64-unknown-linux-gnu
>
> This path must be used then:
>
> library(rgrass7)
>
> # initialisation and the use of North Carolina sample dataset
> initGRASS(gisBase =
> "/home/veroandreo/software/grass-7.0.svn/dist.x86_64-unknown-linux-gnu",
> home = tempdir(),
> gisDbase = "/home/veroandreo/grassdata/",
> location = "nc_spm_08_grass7", mapset = "user1", SG="elevation",
> override = TRUE)
> ...
>
> and it works fine.
>
> I have updated the Wiki page accordingly:
> http://grasswiki.osgeo.org/wiki/R_statistics/rgrass7#GRASS_within_R
>
> Cheers
> Markus
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-stats/attachments/20150803/d925dc13/attachment.html>
More information about the grass-stats
mailing list