Dear all:


Should I reinstall GRASS and set up some sort of path, so that R is 
recognized? Would anyone be able to send me key words to find more 
basic, newbie, information on "PATH" and "R_LIBS"? I would like to find 
the paths, and set the proper variables, but I am unsure where to start. I have fiddled in GRASS now without R, but I would like to use R within GRASS. 

Which location should I do all this 
in? There are more than option for GRASS, e.g., command line, GUI (with 
MSYS, without, etc.), MSYS UNIX console; I am not sure which one to use 
for loading R within GRASS.


Any suggestions are much appreciated.

Thank you,
Laura


> Dear all:
> 
> I am trying to get
 R to run with grass, but I am running into trouble.
> 
> 
> This is what I have done so far:
> 
> Installed GRASS 6.4.2 for Windows XP
> Installed spgrass6 with dependencies.
> 
> When I do:
> library(spgrass6)
> gmeta6()
> 
> I get the following:
> Error in system(cmd0,intern=TRUE); "g.region.exe' not found
> Error in parseGRASS(cmd) : g.region not found.
> 
>
 Any suggestions are much appreciated. I am new to using GRASS with R, 
but I am looking forward to using them together to analyze data.
> 
>
 I am unsure which terminal to run R in GRASS because I keep getting 
errors in the command console in GRASS: I type into either "Command 
console in GRASS GIS Layer Manager" OR "GRASS Command Line":
> 
> R
> ...Then I get
> 
> 'R' is not recognized as an internal or external command, operable program or batch file.

This
 suggests that you need to give the complete path to R from within your 
GRASS session. It may be "C:/Program Files/R/R-2.14.1/bin/Rgui.exe" or 
something like that, depending on where you installed it. You may also 
need to add R_LIBS="<whatever>" to this, to show where any local 
libraries may be.

Alternatively, you may try to add R's binary 
location to your PATH environment variable, and declare R_LIBS globally;
 these used to be under advanced system properties.

Finally, as 
Rainer suggests, you may start GRASS from within R, using the same logic
 in reverse, giving the full path to the GRASS install location to the 
initGRASS() function. The key in both cases is to find out where in your
 file system the software components live, and note changes when you 
upgrade.

Hope this helps,

Roger
	[[alternative HTML version deleted]]

