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

Paulo van Breugel p.vanbreugel at gmail.com
Sun Feb 7 07:39:08 PST 2016


On Sun, Feb 7, 2016 at 3:25 PM, Roger Bivand <Roger.Bivand at nhh.no> wrote:

> 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).
>

I am using Rstudio within GRASS without problems (on Ubuntu 14.04). No
specific configuration required as far as I remember. Also on Windows I
generally have no problem running Rstudio under GRASS (the latter installed
using OSGeo4W), but there I had to define the path to Rstudio (
https://pvanb.wordpress.com/2014/12/17/access-r-from-grass-gis-on-windows/)


>
> 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
> _______________________________________________
> grass-stats mailing list
> grass-stats at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-stats
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-stats/attachments/20160207/049559a2/attachment.html>


More information about the grass-stats mailing list