[R] spgrass6 and aggregation

jessica.gervais at tudor.lu
Wed, 06 Jun 2007 08:21:03 -0000

Dear all,


I am exporting grass map into R thanks to the very useful spgrass6 package.

library(spgrass6)

# I have 3 map I am working with a MASK map of a specific area.

# 1) a landuse map
landuse<-readRAST6("landuse_mapname_in_grass")

# 2) a catchment map which divide the area in several catchements
catchment<-readRAST6("catchement_mapname_in_grass")

# 3) a precipitation map
precipitation<-readRAST6("precipitation_mapname_in_grass")


# then I would like to sum the precipitation spatialy over each catchment
and landuse. So, first I cbind all maps with cbind

MAP<-cbind(Dear all,