collapse | R Documentation |
Collapse multiple edge types to a single list or matrix
collapse(
edges,
v1,
v2,
dir = 1,
matrix = FALSE,
nv,
sparse = FALSE,
sort = 1,
rev = FALSE,
double_up = FALSE
)
edges |
list of edges to include |
v1 , v2 |
incoming and outgoing vertices, defaults to all. |
dir |
direction |
matrix |
logical indicating whether to force the return of an adjacency matrix |
nv |
number of vertices for |
sparse |
should we use sparse matrices if available? |
sort |
1=unique but not sorted, 2=unique and sorted, 0=neither |
rev |
logical: should directed |
double_up |
logical: should edges with |
returns an edgeMatrix
or adjMatrix
for possibly multiple edge types.
If any of the edges are specified as an adjacency matrix, then the output will also
be an adjacency matrix, and similarly for an edgeMatrix
.
If nv
is not supplied, then it is inferred from the input.
If v1
or v2
are specified then the first and
second vertices must belong to these respective sets.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.