Re: [R-sig-Geo] Convert kde object into spatial object

2009-11-27 Thread Michael Sumner
Here's one way: library(ks) data(unicef) H.scv <- Hscv(x=unicef) fhat <- kde(x=unicef, H=H.scv) image(fhat$eval.points[[1]], fhat$eval.points[[2]], fhat$estimate) library(sp) spkde <- image2Grid(list(x = fhat$eval.points[[1]], y = fhat$eval.points[[2]], z = fhat$estimate)) contour(spkde, add

[R-sig-Geo] Convert kde object into spatial object

2009-11-27 Thread Tyler Dean Rudolph
Is there a way to convert a kde object (ks package) into a spatial object (e.g. SpatialPixels, SpatialPolygons) for export into a GIS? Alternatively, is there a way to generate the 2-D spatial area underneath the 3-D utilisation distribution of a kde object? I have explored the package descripti