Description Usage Arguments Details Value
View source: R/edge2vertices.R
Vertices refer to the [source, target]
ordered pair defining a
directed edge. Indices refer to a 1-D index into the graph representation.
The functions edge2vertices
and vertices2edge
translate between these representations.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | edge2vertices(x, ...)
## S3 method for class 'matrix'
edge2vertices(x, indices)
## S3 method for class 'igraph'
edge2vertices(g, indices)
vertices2edge(x, ...)
## S3 method for class 'matrix'
vertices2edge(x, vertices)
## S3 method for class 'igraph'
vertices2edge(g, vertices)
|
x |
An adjacency matrix |
indices |
A numeric vector; 1-D index referencing edges in the graph. |
g |
An igraph object |
vertices |
A matrix specifying edges as source->target ordered pairs. |
Adjacency matrices are assumed to be oriented such that the row indicates the source vertex and the column indicates that target vertex.
The returned matrix of vertices
will be oriented such that each
column is an edge. The first row contains the source vertices, and the
second row contains the target vertices.
A matrix of vertex pairs representing edges. Each column is an edge, and the first row is the source vertex.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.