Generate a random set by taking a random selection of tiles of a given tessellation.
rMosaicSet(X, p=0.5)
A window (object of class "owin"
).
A tessellation (object of class "tess"
).
Probability of including a given tile. A number strictly between 0 and 1.
Adrian Baddeley Adrian.Baddeley@curtin.edu.au and Rolf Turner rolfturner@posteo.net
Given a tessellation X
, this function
randomly selects some of the tiles of X
,
including each tile with probability
One application of this is Switzer's (1965) example of a random set
which has a Markov property. It is constructed by generating X
according to a Poisson line tessellation (see rpoislinetess
).
Switzer, P. A random set process in the plane with a Markovian property. Annals of Mathematical Statistics 36 (1965) 1859--1863.
rpoislinetess
,
rMosaicField
if(interactive()) {
lambda <- 3
n <- 30
} else {
lambda <- 1
n <- 5
}
# Switzer's random set
X <- rpoislinetess(lambda)
plot(rMosaicSet(X, 0.5), col="green", border=NA)
# another example
Y <- dirichlet(runifpoint(n))
plot(rMosaicSet(Y, 0.4))
Run the code above in your browser using DataLab