create_network_from_association_matrix: Create a network object from an association matrix

Description Usage Arguments Value Examples

View source: R/networks.R

Description

Create a network object from an association matrix

Usage

1

Arguments

association_matrix

The association matrix for the network. This is converted to a single module structure with partial correlations specified by the nonzero values in the matrix.

...

Additional arguments passed to create_module_from_association_matrix().

Value

A network object.

Examples

1
2
3
4
5
6
7
8
# Create a random weighted network and extract the association matrix from it.
nw <- random_network(10)
nw <- gen_partial_correlations(nw)
assoc_mat <- get_association_matrix(nw)
# Any association matrix can be used to directly create a network object.
# However, the created network will only contain one module.
nw_from_assoc <- create_network_from_association_matrix(assoc_mat)
all(get_adjacency_matrix(nw) == get_adjacency_matrix(nw_from_assoc))

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