Peter, If this is an "im" object you can use
library(raster) r <- raster(im) r <- polygonsToRaster(pols, r, mask=TRUE) You can also use the coercion methods between spatsat and sp that are available in maptools and then use sp overlay methods I do not know if you can clip in spatstat, but I would guess so. Robert On Fri, Oct 29, 2010 at 12:28 PM, Peter Larson <pslars...@gmail.com> wrote: > Hello all, > > Is there any way to convert from spatstat to sp? > > Specifically, I am looking to clip a density plot produced in spatstat > to include only points within a polygon boundary in a shapefile. if > there is a way to clip in spatstat, this would also be acceptable. > > Any ideas? > > Thanks > > pete > > _______________________________________________ > R-sig-Geo mailing list > R-sig-Geo@stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/r-sig-geo > _______________________________________________ R-sig-Geo mailing list R-sig-Geo@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo