spatstat (version 1.34-1)

methods.linfun: Methods for Functions on Linear Network

Description

Methods for the class "linfun" of functions on a linear network.

Usage

## S3 method for class 'linfun':
print(x, \dots)

## S3 method for class 'linfun': plot(x, \dots, L=NULL, eps = NULL, dimyx = NULL, xy = NULL, main="")

## S3 method for class 'linfun': as.linim(X, L, \dots, eps = NULL, dimyx = NULL, xy = NULL)

## S3 method for class 'linfun': as.owin(W, \dots)

## S3 method for class 'linfun': as.linnet(X, \dots)

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

Arguments

X,x,W
A function on a linear network (object of class "linfun").
L
A linear network
eps,dimyx,xy
Arguments passed to as.mask to control the pixel resolution.
...
Extra arguments passed to plot.im or print.default.
main
Main title for plot.

Value

  • For print.linfun the result is NULL.

    For plot.linfun the result is the same as for plot.im. For the conversion methods, the result is an object of the required type: as.linim.linfun returns an object of class "linim", and so on.

Details

These are methods for the generic functions plot, print and the spatstat generic functions as.owin, as.linnet, as.linim.

An object of class "linfun" represents a mathematical function that could be evaluated at any location on a linear network. It is essentially an Rfunction with some extra attributes.

The method as.linnet.linfun extracts the linear network on which the function is defined. The method as.owin.linfun extracts the two-dimensional spatial window containing the linear network. The method as.linim.linfun converts the function to a pixel image on the linear network (an object of class "linim").

Examples

Run this code
data(letterR)
   X <- runiflpp(3, simplenet)
   f <- nnfun(X)
   f
   plot(f)
   as.function(f)
   as.owin(f)
   as.linnet(f)
   as.linim(f)

Run the code above in your browser using DataCamp Workspace