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