matrix_to_df: Convert matrices to dataframe list for network

View source: R/matrix_to_df.R

matrix_to_dfR Documentation

Convert matrices to dataframe list for network

Description

Description of the convert matrices to data frame list for network function.

Usage

matrix_to_df(func_mat, str_mat)

Arguments

func_mat

a square, symmetric matrix to be used as the main input for the hms algorithm. For brain connectivity, this will be a representation of functional (e.g., BOLD) connectivity.

str_mat

a square, symmetric matrix to be used as the guidance input for the hms algorithm. For brain connectivity, this will be a representation of structural (e.g., white matter) connectivity.

Details

This is an ancillary function that creates a data frame list for the initial network. This is the form of the network used for the spinglass algorithm

Value

A list containing the functional matrix, structural matrix, a data frame of the functional edge weights, a data frame of the structural edge weights, and nodal information (functional degree, structural degree, community assignment, and label information)

Examples


# Using the example data SBM_net$func_matrix and SBM_net$str_mat
net <- matrix_to_df(SBM_net$func_mat, SBM_net$str_mat)
str(net)
identical(net, SBM_net)


CommKern documentation built on Sept. 23, 2022, 5:07 p.m.