# rectangle
u <- unit.square()
border(u, 0.1)
border(u, 0.1, outside=TRUE)
# polygon
<testonly>opa <- spatstat.options(npixel=32)</testonly>
data(letterR)
plot(letterR)
plot(border(letterR, 0.1), add=TRUE)
plot(border(letterR, 0.1, outside=TRUE), add=TRUE)
<testonly>spatstat.options(opa)</testonly>
Run the code above in your browser using DataLab