rMosaicField {spatstat} | R Documentation |
Generate a realisation of a random field which is piecewise constant on the tiles of a given tessellation.
rMosaicField(X, rgen = function(n) { sample(0:1, n, replace = TRUE)}, ..., rgenargs=NULL)
X |
A tessellation (object of class |
... |
Arguments passed to |
rgen |
Function that generates random values for the tiles of the tessellation. |
rgenargs |
List containing extra arguments that should be passed
to |
This function generates a realisation of a random field
which is piecewise constant on the tiles of the given
tessellation X
. The values in each tile
are independent and identically distributed.
A pixel image (object of class "im"
).
Adrian Baddeley Adrian.Baddeley@curtin.edu.au
and Rolf Turner r.turner@auckland.ac.nz
X <- rpoislinetess(3) plot(rMosaicField(X, runif)) plot(rMosaicField(X, runif, dimyx=256)) plot(rMosaicField(X, rnorm, rgenargs=list(mean=10, sd=2))) plot(rMosaicField(dirichlet(runifpoint(30)), rnorm))