create_module_from_association_matrix {SeqNet}R Documentation

Create a module from an association matrix

Description

The edge weights in the module will be set to the corresponding values in the association matrix. The edges are undirected, and only the lower triangle of the matrix is considered. See set_module_weights for more details.

Usage

create_module_from_association_matrix(
  association_matrix,
  nodes = NULL,
  module_name = NULL
)

Arguments

association_matrix

The association matrix used to create the module.

nodes

A numeric vector indicating which nodes in the network are contained in this module.

module_name

(optional) Character string specifying the name of the module. If NULL, the module will be unnamed.

Value

A 'network_module' object.

Examples

nw <- random_network(10)
nw <- gen_partial_correlations(nw)
assoc_mat <- get_association_matrix(nw)
create_module_from_association_matrix(assoc_mat)

[Package SeqNet version 1.1.3 Index]