as.igraph.matrix: Coerce a Weight Matrix into an igraph Object.
Description
Coerce a Weight Matrix into an igraph Object.
Usage
# S3 method for matrix
as.igraph(x, mode = "directed", ...)
Value
An igraph object with one vertex per row of x and one
weighted edge per non-zero element of x.
Arguments
x
A matrix of edge weights.
mode
Character scalar, specifies how igraph should interpret the
supplied matrix. See also the weighted argument, the interpretation
depends on that too. Possible values are: directed,
undirected, upper, lower, max, min,
plus. See details below.