[R] GRASS raster data processing
Nikos Alexandris
nikos.alexandris at felis.uni-freiburg.de
Thu Jun 11 17:18:46 CEST 2009
Maayt:
> I just imported two raster maps into R using the SPGRASS6 package, one
> containing elevation data and the other containing an erosion index:
> Kar_inc <-readRAST6("Incis_Kar", plugin=FALSE)
> Kar_dem <- readRAST6("DEM_Kar", plugin=FALSE)
>
> I just wanted to make a xy plot of erosion parameter vs elevation. How does
> this work? I don't get how to handle SpatialGridDataFrames...
Maarten,
you can check some web-pages with respect to GRASS & R [1][2]. This is a
question for grass-stats actually [3].
A quick answer: check the structure of the newly created object and you
will find that the "numbers" are to be found in (e.g. for "Incis_Kar" )
Kar_inc at data$Incis_Kar.
So use "@data" and the "$" to access a "slot".
Kind regards, Nikos
---
[1] http://grass.osgeo.org/wiki/R
[2] http://grass.ibiblio.org/statsgrass/index.php#grassR
[3] http://grass.osgeo.org/statsgrass/index.php
More information about the R-help
mailing list