View source: R/transformations.R
| nodelistToEdgelist | R Documentation |
Convert sequence of nodes to edge list.
nodelistToEdgelist(nodelist)
nodelist |
[ |
[matrix] Edge list.
Other transformation functions:
charVecToEdgelist(),
edgeListToCharVec(),
permutationToCharVec(),
permutationToEdgelist(),
prueferToCharVec(),
prueferToEdgeList()
# first generate a random permutation, e.g., representing
# a roundtrip tour in a graph
nodelist = sample(1:8)
# now convert into an edge list
nodelistToEdgelist(nodelist)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.