setEdges | R Documentation |
The function setEdges
allows one to add or remove edges in a
gGraph by directly specifying the relevant nodes, as a list or
a data.frame. This low-level function is called by geo.add.edges
and
geo.remove.edges
.
setEdges(x, ...)
## S4 method for signature 'gGraph'
setEdges(x, add = NULL, remove = NULL, costs = NULL, ...)
x |
a valid gGraph object. |
... |
other arguments passed to other methods (currently unused). |
add |
a list or a dataframe containing node names of edges to be added.
The first element of the list (or column of the data.frame) gives starting
nodes of edges; the second gives ending nodes. Hence, the nodes of the i-th
edge are |
remove |
same as |
costs |
a numeric vector providing costs of the edges to be added.
|
A gGraph object with newly added or removed edges.
setEdges(gGraph)
: Method for gGraph object
geo.add.edges
and geo.remove.edges
to
interactively add or remove edges in a gGraph object.
getEdges
to retrieve edges in different formats.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.