Description Usage Arguments Details Value Examples
Given two points in a matrix p1
and p2
, find the points nearest to an
ideal path of n
points between them.
1 2 | pathway(x, p1, p2, n = 4L, navigator = navigate_unique, verbose = FALSE,
...)
|
x |
A two-dimensional numeric matrix. |
p1 |
Integer. Row index of point at the start of the path. |
p2 |
Integer. Row index of point at the end of the path. |
n |
Integer. Number of intervening points to find. |
navigator |
Function for constraining nearest neighbor search based on previously-selected steps.. See navigate for more details. |
verbose |
Display progress messages. |
... |
Additional arguments passed to distances::distances. |
To put restrictuions on the search made, specify a navigator
function.
Several are supplied in this package, such as navigate_unique, which will
produce a path that does not revisit any points, or navigate_ordered, that
will on return points from progressively later posiiton int he matrix. It is
also possible to specify a custom function using navigate.
A list with the following values
line
A matrix of n
ideal points along a line between p1
and p2
.
i
Row indices of x
indicating matched points.
p1
, p2
Inidices of points origially passed in.
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.