as.linfun

0th

Percentile

Convert Data to a Function on a Linear Network

Convert some kind of data to an object of class "linfun" representing a function on a linear network.

Keywords
manip, spatial
Usage
as.linfun(X, …)

# S3 method for linim as.linfun(X, …)

# S3 method for lintess as.linfun(X, …, values, navalue=NA)

Arguments
X

Some kind of data to be converted.

Other arguments passed to methods.

values

Optional. Vector of function values, one entry associated with each tile of the tessellation.

navalue

Optional. Function value associated with locations that do not belong to a tile of the tessellation.

Details

An object of class "linfun" represents a function defined on a linear network.

The function as.linfun is generic. The method as.linfun.linim converts objects of class "linim" (pixel images on a linear network) to functions on the network.

The method as.linfun.lintess converts a tessellation on a linear network into a function with a different value on each tile of the tessellation. If the argument values is missing or null, then the function returns factor values identifying which tile contains each given point. If values is given, it should be a vector with one entry for each tile of the tessellation: any point lying in tile number i will return the value v[i].

Value

Object of class "linfun".

See Also

linfun

Aliases
  • as.linfun
  • as.linfun.linim
  • as.linfun.lintess
Examples
# NOT RUN {
   X <- runiflpp(2, simplenet)
   Y <- runiflpp(5, simplenet)

   # image on network
   D <- density(Y, 0.1, verbose=FALSE)

   f <- as.linfun(D)
   f
   f(X)

   # tessellation on network
   Z <- lineardirichlet(Y)
   g <- as.linfun(Z)
   g(X)
   h <- as.linfun(Z, values = runif(5))
   h(X)
# }
Documentation reproduced from package spatstat, version 1.57-1, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.