[GRASS-stats] R packages and GRASS

Agustin Lobo alobolistas at gmail.com
Thu Nov 5 11:04:55 EST 2009


which error? we don't see it. Note you must start R from within
the grass console. Actually it's better if, from the grass console,
you launch xterm & and can start R from the new terminal.

Agus

Felipe Carrillo wrote:
> Hi all:
> I'm brand new to GRASS and this list and just wanted to see if someone could point out to what I need to synchronize R and GRASS. I already downloaded GRASS 6.3, spgrass6 and dependencies and at my first attempt something is happening but I can't quite see a way to import data into R or run commands from R. I ran into the code below yesterday but I can't figure out how to run it from R. 
> I tried: system("g.region rast=elevation.dem") but I get an error message. Thanks
> # set region:
> g.region rast=elevation.dem
>
> # extract some random points from an elevation dataset
> v.random out=rs n=300
>
> # create attribute table:
> v.db.addtable map=rs columns="elev double"
>
> # extract raster data at points
> v.what.rast vect=rs rast=elevation.dem column=elev
>
> # simple display:
> d.rast elevation.dem
> d.vect rs size=4
>
> # start R
> R
>
>
> Felipe D. Carrillo  
> Supervisory Fishery Biologist  
> Department of the Interior  
> US Fish & Wildlife Service  
> California, USA
>
>
>       
> _______________________________________________
> grass-stats mailing list
> grass-stats at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-stats
>
>   

-------------- next part --------------
A non-text attachment was scrubbed...
Name: alobolistas.vcf
Type: text/x-vcard
Size: 251 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-stats/attachments/20091105/3964d6a6/alobolistas.vcf


More information about the grass-stats mailing list