Learn R Programming

EGAnet (version 2.0.7)

igraph2matrix: Convert network to matrix

Description

Converts network to matrix

Usage

igraph2matrix(igraph_network, diagonal = 0)

Value

Returns a network in the format

Arguments

igraph_network

network object

diagonal

Numeric (length = 1). Value to be placed on the diagonal of network. Defaults to 0

Author

Hudson Golino <hfg9s at virginia.edu> & Alexander P. Christensen <alexander.christensen at Vanderbilt.Edu>

Examples

Run this code
# Convert network to {igraph}
igraph_network <- convert2igraph(ega.wmt$network)

# Convert network back to matrix
igraph2matrix(igraph_network)

Run the code above in your browser using DataLab