[STATSGRASS] making R and grass(6.1) play well together.

Tom Colson tom_colson at ncsu.edu
Wed Jun 29 11:33:30 EDT 2005


Thanks for the quick reply. 

I did install spgrass6 and all its dependencies and have managed to
reproduce this:

> library(spgrass6)

> G <- gmeta6()

> dem <- readFLOAT6sp("ncfpm_2694")



Specifically, though, I am seeking how to import the raster DEM into
some sort of format that the stats library will recognize so I can plot
the ecdf cruves......ie..

library(stats)
plot(ecdf(dem))
plot(ecdf(dem), verticals=T, do.points=F)


On Wed, 2005-06-29 at 17:30 +0200, Edzer J. Pebesma wrote:
> Tom, there has been quite a bit of development in this area;
> first we have made an R package (sp) which has classes and
> methods for dealing with spatial points, lines, polygons and grid
> objects in R, and then Roger rewrote the grass R package to
> work with these data. You can read about it in the latest
> grass news, and you can see (more) examples on
> http://r-spatial.sourceforge.net/ , follow the link "sp and other
> packages" which has examples on spgrass6.
> 
> Best regards,
> --
> Edzer
> 
> Tom Colson wrote:
> 
> >I managed to get R compiled and all the packages talking to grass as it
> >should, and all the "demos" seem to work. There is a neat tutorial on
> >working with DEM (grass raster) in R
> >http://grass.itc.it/statsgrass/learning_r2.html#Working_with_elevation
> >
> >Tutorial works great with the sample data provided...yet I can't figure
> >out how to get "current" raster dems in my mapset/location into a format
> >that is acceptable to R...re: the tutorial syntax. Been looking through
> >all the man pages, but there doesn't seem to be any documentation on
> >raster import that would allow one to go through that tutorial using
> >one's own data....
> >  
> >




More information about the grass-stats mailing list