create_network_from_association_matrix {SeqNet}R Documentation

Create a network object from an association matrix

Description

Create a network object from an association matrix

Usage

create_network_from_association_matrix(association_matrix, ...)

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

# 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))

[Package SeqNet version 1.1.3 Index]