get_association_matrix.network_module: Get association matrix

Description Usage Arguments Value Examples

View source: R/modules.R

Description

Get association matrix

Usage

1
2
## S3 method for class 'network_module'
get_association_matrix(x, tol = 10^-13, ...)

Arguments

x

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

tol

A small tolerance threshold; any entry that is within 'tol' from zero is set to zero.

...

Additional arguments.

Value

An association matrix with entry ij != 0 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_association_matrix(nw)
module <- nw$modules[[1]]
get_association_matrix(module)

tgrimes/SeqNet documentation built on Sept. 1, 2020, 7:50 a.m.