Methods for the class "linfun" of functions on a linear network.
# S3 method for linfun
print(x, …) # S3 method for linfun
summary(object, …)
# S3 method for linfun
plot(x, …, L=NULL,
eps = NULL, dimyx = NULL, xy = NULL,
main)
# S3 method for linfun
as.linim(X, L, …, eps = NULL, dimyx = NULL, xy = NULL)
# S3 method for linfun
as.data.frame(x, …)
# S3 method for linfun
as.owin(W, …)
# S3 method for linfun
as.function(x, …)
A function on a linear network
(object of class "linfun").
A linear network
Arguments passed to as.mask to control
the pixel resolution.
Extra arguments passed to plot.im or
print.default, or passed to the function itself.
Main title for plot.
For print.linfun and summary.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.
These are methods for the generic functions
plot, print, summary
as.data.frame and as.function,
and for the spatstat generic functions
as.owin and
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 R function with some
extra attributes.
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").
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 as.linim and to plot.linfun.
# NOT RUN {
X <- runiflpp(3, simplenet)
f <- nnfun(X)
f
plot(f)
as.function(f)
as.owin(f)
as.linim(f)
head(as.data.frame(f))
# }
Run the code above in your browser using DataLab