rMosaicField

0th

Percentile

Mosaic Random Field

Generate a realisation of a random field which is piecewise constant on the tiles of a given tessellation.

Keywords
spatial, datagen
Usage
rMosaicField(X, 
    rgen = function(n) { sample(0:1, n, replace = TRUE)},
    ...,
    rgenargs=NULL)
Arguments
X
A tessellation (object of class "tess").
...
Arguments passed to as.mask determining the pixel resolution.
rgen
Function that generates random values for the tiles of the tessellation.
rgenargs
List containing extra arguments that should be passed to rgen (typically specifying parameters of the distribution of the values).
Details

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.

Value

  • A pixel image (object of class "im").

See Also

rpoislinetess, rMosaicSet

Aliases
  • rMosaicField
Examples
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))
Documentation reproduced from package spatstat, version 1.21-0, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.