[GRASS-stats] initGRASS() never stops running?

Roger Bivand Roger.Bivand at nhh.no
Sun Feb 7 06:25:58 PST 2016


On Sun, 7 Feb 2016, Andrew Plowright wrote:

> Hello,
>
> I recently subscribed to this mailing list since I was hoping to get a bit
> of help setting up the rgrass7 package. I do all my GIS work in R, and am
> very excited by the prospect of using GRASS functions through the R
> environment. Unfortunately, I haven't gotten very far since I don't seem to
> be able to use the initGRASS() function correctly! When I run:
>
> library(rgrass7)
> initGRASS("C:\\Program Files\\GRASS GIS 7.0.3", home=tempdir())
>
> ... R Studio simply runs forever. It does not give me an error message...
> it just keeps running until I force close the program. I am using R version
> 3.2.2, and have installed GRASS version 7.0.3, which is installed in
> "C:\Program Files\GRASS GIS 7.0.3" folder. GRASS GIS seems to be running
> perfectly fine on its own.


Rstudio is very likely running the system*() commands and the commands 
setting environment variables in ways that interfere in your case. Start 
by using R from the command line, then RGui, then find out how to debug 
running functions in Rstudio and run initGRASS under the debugger to see 
at which step contact gets lost.

I believe that there are reports of success using Rstudio within GRASS (in 
an existing GRASS location, starting Rstudio within GRASS).

Does anyone have any experience? (I do not use Rstudio, so cannot tell - 
under Linux it wants R built in a specific way that I don't want to be 
forced to change to).

Roger

>
> Any help would be greatly appreciated. Thank you!
>
> Andrew Plowright
>

-- 
Roger Bivand
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; fax +47 55 95 91 00
e-mail: Roger.Bivand at nhh.no
http://orcid.org/0000-0003-2392-6140
https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en
http://depsy.org/person/434412


More information about the grass-stats mailing list