[GRASS-stats] GRASS with R interface issues - running R within GRASS 6.4.2

Laura S les_ecol at yahoo.com
Mon Apr 23 17:34:40 EDT 2012


Dear all:

Do you have any suggestions on this? Thank you.


I cannot type in the GRASS GUI with MSYS window and execute commands. It is 
frozen, and when I open up another GRASS console and type R the console 
says: "R is not recognizable as an internal or external command, 
operable program or batch file." 


I provide examples below. Roger has been helpful, but I am still unsure if I am missing something, or there is a bug. 


I have found bugs in other programs, e.g., WinRhizo, but I am assuming GRASS is working fine. I have been looking for screenshot instructions to better understand my issue, so anyone knows of these posted somewhere, this would be helpful. 


Laura


On Mon, 23 Apr 2012, Laura S wrote:

> Dear Roger and others:
> 
> My apologies if I am not piecing everything together. I think I am almost there; I appreciate your patience.
> 
> 
> This is my current point of confusion, and what I am able to do so far:
> 
>
 I. My main point of confusion is that when I type the path into GRASS 
MSYS, the R console window pops up, and I am unable to type more into 
the GRASS console. I cannot type GRASS commands in R, so I am unsure 
where I type the GRASS commands if GRASS console does not let me type 
more, and the R console does not recognize R commands.

Why should
 it? Simply minimise the R GUI to work in GRASS directly, using the 
GRASS GUI or from the prompt in MSYS. I doubt very much whether saying 
d.ask makes sense anyway, as the GRASS display GUI covers that.

It
 is possible to write GRASS commands using execGRASS() from the R 
console, but since you have had to ask, you will find it easier simply 
to minimise R and use GRASS directly. Because R is within GRASS, it 
"sees" the current status of the location.

Hope this clarifies - please change to one of the GRASS lists for further help.

Roger

> 
> 
> II. What I can do so far in more detail:
>
 1. Within the GRASS 6.4.2RC2 with MSYS, I typed using tab 
autocompletion: "C:/Program Files/R/R-2.14/bin/i386/Rgui.exe" which 
causes the RGui to pop up as a second R window. Thus, I am not in GRASS 
directly anymore I assume, but rather in the RGui. In this GUI, it says 
the following when I type library(spgrass6): "GRASS GIS Interface loaded
 with GRASS version GRASS 6.4.2RC2exported (2011) and location: 
demolocation" gmeta6() gisdbase C:/Documents etc. 
> 
> If I try a GRASS command such as "d.ask" in the RGUI after loading spgrass:
> 
> d.ask
> Error: object 'd.ask' not found
> 
> 
>
 2. I can also get this to work in R directly: loc <- 
initGRASS("C:/Program Files/Grass 6.4",home=tempdir()) gmeta6() **prints
 gisdbase, etc.** 
> 
> d.ask
> Error: object 'd.ask' not found
> 
> 
> Thank you for your help,
> Laura 
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-stats/attachments/20120423/13b31b3d/attachment.html


More information about the grass-stats mailing list