[R-sig-Geo] kernels, contours, points?
Jeebz
chunkylo at gmail.com
Wed Jul 16 22:15:17 CEST 2008
Hi
I'm new to the R spatial packages, but I have a spatial-oriented task
I would like to accomplish.
I have a 2d grid of points and each point has a class (13 classes
total in the dataset). The grid is small-ish, only 256x256. I have
run a 2d kernel density estimation (using kde2d) and can create a
contour plot easily (per class).
What I would like to do is use a contour line to extract all the
points from the original grid that are bounded by that contour.
Ultimately, I wish to calculate a sort of "purity" measure, so given a
particular contour (e.g. a contour level that encloses 95% of the
classes points), how many points from other classes fall in with the
classes that were used to define the contour.
I know there has to be a way to do this with R... right? A colleague
of mine showed my how it could be done using ArcGIS and "Hawkes
tools", by calculating percent volume contours, but I don't know where
to begin in R.
Anyone have any thoughts or examples on this?
Much thanks in advance,
bct
More information about the R-sig-Geo
mailing list