Create a function on a linear network.
A linear network (object of class
This creates an object of class
This is a simple mechanism for handling a function
defined on a linear network, to make it easier to display
f should be a
function in the R language,
with formal arguments
x,y,seg,tp (and optional additional
Cartesian coordinates of locations on the linear network,
seg, tp are the local coordinates.
f should be vectorised: that is,
x,y,seg,tp are numeric vectors of the same length
v <- f(x,y,seg,tp)
should be a vector of length
L should be a linear network (object of class
on which the function
f is well-defined.
The result is a function
g in the R language which belongs to
the special class
"linfun". There are several methods
for this class including
This function can be called as
X is an
or called as
x,y,seg,tp are coordinates. If the original function
had additional arguments, then these may be included in the call
g, and will be passed to
A function in the R\ language.
It also belongs to the class
"linfun" which has methods
1 2 3 4 5 6 7 8 9 10 11 12 13
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.