as.igraph.matrix: Coerce a Weight Matrix into an 'igraph' Object.

View source: R/utilities.R

as.igraph.matrixR Documentation

Coerce a Weight Matrix into an igraph Object.

Description

Coerce a Weight Matrix into an igraph Object.

Usage

## S3 method for class 'matrix'
as.igraph(x, mode = "directed", ...)

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.

...

Ignored.

Value

An igraph object.

See Also

Helper functions as.igraph.group_tna(), as.igraph.tna()


tna documentation built on June 8, 2025, 10:33 a.m.