sparseAdjMat.to.igraph: Convert Network from Sparse Adjacency Matrix into igraph...

Description Usage Arguments Value See Also

View source: R/network.R

Description

Uses graph_from_adjacency_matrix function from the igraph package to convert the network in sparse adjacency matrix format into igraph network object.

Usage

1
sparseAdjMat.to.igraph(sparseAdjMat, mode = "directed")

Arguments

sparseAdjMat

Network represented as a sparse adjacency matrix (S4 class object dgCMatrix from package Matrix). NOTE: for directed graphs the friend IDs pointing into vertex i are assumed to be listed in the column i (i.e, which(sparseAdjMat[,i]) are friends of i).

mode

Character scalar, passed on to igraph::graph_from_adjacency_matrix, specifies how igraph should interpret the supplied matrix. See ?igraph::graph_from_adjacency_matrix for details.

Value

A list containing the network object(s) of type DAG.net.

See Also

network; igraph.to.sparseAdjMat; sparseAdjMat.to.NetInd; NetInd.to.sparseAdjMat;


osofr/simcausal documentation built on Jan. 6, 2019, 3:05 a.m.