Given a point pattern representing a set of vertices, this command gives a point-and-click interface allowing the user to join pairs of selected vertices by edges.
clickjoin(X, ..., add = TRUE, m = NULL, join = TRUE)
Point pattern of vertices. An object of class
Arguments passed to
Logical. Whether the point pattern
Optional. Logical matrix specifying an initial
set of edges. There is an edge between vertices
This function makes it easier for the user to create a linear network or a planar graph, given a set of vertices.
The function first displays the point pattern
then repeatedly prompts the user to click on a pair of points in
Each selected pair of points will be joined
by an edge. The function returns a
logical matrix which has entries equal to
TRUE for each
pair of vertices joined by an edge.
The selection of points is performed
identify.ppp which typically expects the user to
click the left mouse button. This point-and-click interaction
continues until the user terminates it,
by pressing the middle mouse button,
or pressing the right mouse button and selecting
The return value can be used in
to create a linear network.
m with value
m[i,j] = TRUE for every
pair of vertices
X[j] that should be joined by
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.