Skip to content

R-sig-Geo Digest, Vol 50, Issue 4

1 message · Marco Helbich

#
Dear Kam Tin Seong,

try something like this:
w <- readShapePoly("xxxx.shp")
W <-as(as(w, "SpatialPolygons"), "owin")  # polygon window
plot(W)
pts.ppp <- as.ppp(xykoord, W) # xykoord=point pattern
summary(pts.ppp)
plot(pts.ppp)

Best regards
Marco
______________________________

Marco Helbich
Institute for Urban and Regional Research, 
Austrian Academy of Sciences 
Postgasse 7/4/2, A-1010 Vienna, Austria
phone: +43 (1) 51581-3494
mail: marco.helbich (at) oeaw.ac.at