Tiffany,
You can indeed use extract to compute a single value for each polygon. See
the examples. Alternatively, you can use rasterize and then use crosstab.
Robert

On Fri, Mar 22, 2013 at 10:13 AM, Tiffany Smith <smithtiffanyt@gmail.com>wrote:

> 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
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

	[[alternative HTML version deleted]]

