Learn R Programming

tna (version 1.5.8)

as.igraph.tna: Coerce a tna Object into an igraph Object.

Description

Coerce a tna Object into an igraph Object.

Usage

# S3 method for tna
as.igraph(x, mode = "directed", ...)

Value

An igraph object with one vertex per state and one weighted edge per non-zero element of the weight matrix of x.

Arguments

x

A tna object.

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.

See Also

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

Examples

Run this code
as.igraph(tna(group_regulation))

Run the code above in your browser using DataLab