Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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, ...)

  ## S3 method for class 'linfun'
summary(object, ...)

  ## S3 method for class 'linfun'
plot(x, ..., L=NULL, main) 

  ## S3 method for class 'linfun'
as.data.frame(x, ...)

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

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

Arguments

x,object,W

A function on a linear network (object of class "linfun").

L

A linear network

...

Extra arguments passed to as.linim, plot.linim, plot.im or print.default, or arguments passed to x if it is a function.

main

Main title for plot.

Details

These are methods for the generic functions plot, print, summary as.data.frame and as.function, and for the spatstat generic function as.owin.

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

The method as.owin.linfun extracts the two-dimensional spatial window containing the linear network.

The method plot.linfun first converts the function to a pixel image using as.linim.linfun, then plots the image using plot.linim.

Note that a linfun function may have additional arguments, other than those which specify the location on the network (see linfun). These additional arguments may be passed to plot.linfun.

Value

For print.linfun and summary.linfun the result is NULL.

For plot.linfun the result is the same as for plot.linim.

For the conversion methods, the result is an object of the required type: as.owin.linfun returns an object of class "owin", and so on.

Author(s)

Adrian Baddeley Adrian.Baddeley@curtin.edu.au, Rolf Turner r.turner@auckland.ac.nz and Ege Rubak rubak@math.aau.dk

Examples

X <- runiflpp(3, simplenet)
   f <- nnfun(X)
   f
   plot(f)
   as.function(f)
   as.owin(f)
   head(as.data.frame(f))

spatstat.linnet

Linear Networks Functionality of the 'spatstat' Family

v2.1-1
GPL (>= 2)
Authors
Adrian Baddeley [aut, cre], Rolf Turner [aut], Ege Rubak [aut], Ottmar Cronie [ctb], Tilman Davies [ctb], Greg McSwiggan [ctb], Suman Rakshit [ctb]
Initial release
2021-03-28

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.