spatstat (version 1.45-0)

as.function.tess: Convert a Tessellation to a Function

Description

Convert a tessellation into a function of the $x$ and $y$ coordinates. The function values are factor levels specifying which tile of the tessellation contains the point $(x,y)$.

Usage

## S3 method for class 'tess':
as.function(x,\dots)

Arguments

x
A tessellation (object of class "tess").
...
Ignored.

Value

  • A function in the Rlanguage, also belonging to the class "funxy".

Details

This command converts a tessellation (object of class "tess") to a function(x,y) where the arguments x and y are (vectors of) spatial coordinates. The corresponding function values are factor levels identifying which tile of the tessellation contains each point. Values are NA if the corresponding point lies outside the tessellation.

See Also

tileindex for the low-level calculation of tile index.

cut.ppp and split.ppp to divide up the points of a point pattern according to a tessellation.

Examples

Run this code
X <- runifpoint(7)
  V <- dirichlet(X)
  f <- as.function(V)
  f(0.1, 0.4)
  plot(f)

Run the code above in your browser using DataLab