António,

You must run this from the GRASS term window; first start R at the GRASS shell prompt, by typing R; then load spgrass6: library(spgrass6) — the supporting libraries (sp, rgdal, etc.) must be installed in R first.

Regards,
Tom


António M. Rodrigues wrote:
Hi,

I've installed spgrass6, which apparently went fine (on my mac).


All the examples I found run R commands from the GRASS console (hence not being necessary to specify the GRASS LOCATION, etc.

Isn't it possible to specify a GRASS LOCATION from within the R interface?

In R, I loaded spgrass6, then tried:

> initGRASS("/Applications/grass-6.4.app")

and I get:

/bin/sh: g.gisenv: command not found
/bin/sh: g.gisenv: command not found
/bin/sh: g.gisenv: command not found
/bin/sh: g.gisenv: command not found
/bin/sh: g.gisenv: command not found
Error in if (file.exists(file) == FALSE) if (!missing(asText) && asText == :
argument is of length zero
Error in parseGRASS(cmd) : g.region not parsed
sh: g.region: command not found
>

----
If I want to start GRASS and open a specific mapset, would this work?

initGRASS("/Applications/grass-6.4.app", GISdbase="/Users/antonio/Documents/grass", location="pt_etrs89", mapset="interior")

(well, it doesn't, I'm just not sure why...)

Thank you
António_______________________________________________
grass-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-user


--
Thomas E Adams
National Weather Service
Ohio River Forecast Center
1901 South State Route 134
Wilmington, OH 45177

EMAIL:  [email protected]

VOICE:  937-383-0528
FAX:    937-383-0033

_______________________________________________
grass-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to