[R-sig-Geo] convert from spatstat to sp
Robert J. Hijmans
r.hijmans at gmail.com
Fri Oct 29 21:37:44 CEST 2010
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 <pslarson2 at 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 at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
More information about the R-sig-Geo
mailing list