Skip to contents

Create signed graphs from adjacency matrices

Usage

graph_from_adjacency_matrix_signed(A, mode = "undirected", ...)

Arguments

A

square adjacency matrix of a signed graph

mode

Character scalar, specifies how to interpret the supplied matrix. Possible values are: directed, undirected

...

additional parameters for from_adjacency()

Value

a signed network as igraph object

Examples

A <- matrix(c(0, 1, -1, 1, 0, 1, -1, 1, 0), 3, 3)
graph_from_adjacency_matrix_signed(A)
#> IGRAPH 0a0fc4e U--- 3 3 -- 
#> + attr: sign (e/n)
#> + edges from 0a0fc4e:
#> [1] 1--2 1--3 2--3