[R-sig-Geo] circular holes in rectangular polygon

Adrian.Baddeley at csiro.au Adrian.Baddeley at csiro.au
Fri May 28 13:40:37 CEST 2010


Jan Quets Jan.Quets at ua.ac.be writes:

> I want to make a rectangular window with circular holes within.
> I have tried and searched but not found a solution yet.

library(spatstat)
R <- owin(c(0,4),c(0,5))
O <- disc(radius=1, centre=c(2, 3))
W <- complement.owin(O, frame=R)
plot(W)


More information about the R-sig-Geo mailing list