[R-sig-Geo] summarize cells of different value intervals in a raster file by items in ESRI shapefile

Mao Jianfeng jianfeng.mao at gmail.com
Mon Apr 4 18:17:32 CEST 2011


Dear R-Geo listers,

I have a raster file (cell value varies from 0 to 1) and a ESRI
shapefile (there are countries, and provinces inside each countries),
the two files overlapped in the same region. I want to summarized the
cells (with different value intervals, say 0.0-0.25, 0.25-0.5,
0.5-0.75, 0.75-0.1) by countries and provinces in countries. This
means I want to output how many cells of (0.0-0.25, et al.) in each
country and each province.

Are there tools in R to do my job? Could you show me a dummy example of that?

Thanks in advance.



More information about the R-sig-Geo mailing list