get_adjacency_matrix.matrix: Get adjacency matrix

Description Usage Arguments Value Examples

View source: R/generics.R

Description

The adjacency matrix is constructed from all modules in a network.

Usage

1
2
## S3 method for class 'matrix'
get_adjacency_matrix(x, ...)

Arguments

x

Either a 'network', 'network_module', or 'matrix' object.

...

Additional arguments.

Value

An adjacency matrix with entry ij = 1 if node i and j are connected, and 0 otherwise. The diagonal entries are all zero.

Examples

1
2
3
4
5
6
7
# Create a random network with 10 nodes and add random edge weights.
nw <- random_network(10)
nw <- gen_partial_correlations(nw)
# Get adjacency matrix for the network or individual modules in the network.
get_adjacency_matrix(nw)
module <- nw$modules[[1]]
get_adjacency_matrix(module)

SeqNet documentation built on July 9, 2021, 9:08 a.m.