Prajjwal, you could probably use the raster package to rasterize() your
polygons and then use zonal() to compute the summary statistics.

Etienne


2013/3/11 ppanday <ppanday@clarku.edu>

> Hi
>
> I have a vector polygon which has 3 categories. I am trying to extract a
> raster(and rastergroup) using this vector and then summarize by the Id (3
> polygon categories). Thanking ahead for any suggestions.
>
> Prajjwal
>
> > test.vec
> class       : SpatialPolygonsDataFrame
> nfeatures   : 1736
> extent      : -52.54233, -52.27729, -13.16048, -12.68169  (xmin, xmax,
> ymin,
> ymax)
> coord. ref. : NA
> nvariables  : 1
> names       : Id
> min values  :  0
> max values  :  3
>
>
>
>
>
>
>
>
>
> --
> View this message in context:
> http://r-sig-geo.2731867.n2.nabble.com/extract-by-polygon-ID-tp7583031.html
> Sent from the R-sig-geo mailing list archive at Nabble.com.
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

	[[alternative HTML version deleted]]

