[R-sig-Geo] Aggregate using Shapefile
Tiffany Smith
smithtiffanyt at gmail.com
Fri Mar 22 18:13:10 CET 2013
Hi all,
I'm looking to use a shapefile to aggregate a raster layer. Here's what I have so far:
indexAL<-raster("myfile.nc")
ALshp<-readShapePoly("ALzipcodes.shp")
ALrst<-rasterize(ALshp,indexAL,fun=mean)
"indexAL" has a finer resolution than "ALrst", and I'd like to aggregate "indexAL" up to the scale of "ALrst" in a way that I'm able to create a map in the end. I've used "extract", but am not sure then how to map that output. "aggregate" doesn't seem flexible enough to use a shapefile (or raster layer). Any suggestions?
Thanks,
Tiffany
More information about the R-sig-Geo
mailing list