matrix_to_df {CommKern} | R Documentation |
Description of the convert matrices to data frame list for network function.
matrix_to_df(func_mat, str_mat)
func_mat |
a square, symmetric matrix to be used as the main input
for the |
str_mat |
a square, symmetric matrix to be used as the guidance
input for the |
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
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)
# 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)