# NOT RUN {
# }
# NOT RUN {
rectangle of size [0,110] x [0,90]
# }
# NOT RUN {
wr <- swin(c(0,0,110,90))
summary(wr)
plot(wr)
# }
# NOT RUN {
circle with radius 50 centred on (55,45)
# }
# NOT RUN {
wc <- swin(c(55,45,50))
summary(wc)
plot(wc)
# }
# NOT RUN {
polygon (diamond shape)
# }
# NOT RUN {
t1 <- c(0,0,55,0,0,45)
t2 <- c(55,0,110,0,110,45)
t3 <- c(0,45,0,90,55,90)
t4 <- c(55,90,110,90,110,45)
wp <- swin(wr, rbind(t1,t2,t3,t4))
summary(wp)
plot(wp)
# }
# NOT RUN {
rectangle with a hole
# }
# NOT RUN {
h1 <- c(25,45,55,75,85,45)
h2 <- c(25,45,55,15,85,45)
wrh <- swin(wr, rbind(h1,h2))
summary(wrh)
plot(wrh)
# }
# NOT RUN {
circle with a hole
# }
# NOT RUN {
wch <- swin(wc, rbind(h1,h2))
summary(wch)
plot(wch)
# }
# NOT RUN {
converting an owin object from spatstat.geom
# }
# NOT RUN {
data(demopat)
demo.swin<-owin2swin(demopat$window)
plot(demo.swin)
# }
Run the code above in your browser using DataLab