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. Since the association matrix only provides information on the global connections, the resulting 'network' object will consist of a single weighted module containing these connections. The edge weights, i.e. the partial correlations, will correspond to 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))

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