Description Usage Arguments Value
This function allows you to add a new edge to an existing graph. If weighted graph, will override previous edge.
1 2 | ## S3 method for class 'adjMatrixGraph'
addEdge(graph, node1, node2, weight = 1)
|
node1 |
The first node |
node2 |
The second node |
weight |
Defaults to 1 (used for non-weighted graph) |
the new graph with the added edge and whether the operation was successful
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.