Switch matrix to network table
matrix_to_table(network_matrix, regulators = NULL, targets = NULL)
Network table
data("example_matrix")
network_table <- inferCSN(example_matrix)
#> ℹ Running for <dense matrix>.
#> ℹ Checking input parameters.
#> ℹ Using L0 sparse regression model.
#> ℹ Using 1 core
#> ✔ Run done.
network_matrix <- table_to_matrix(network_table)
network_table_new <- matrix_to_table(network_matrix)
head(network_table)
#> regulator target weight
#> 1 g18 g1 -0.9223177
#> 2 g17 g18 0.8770468
#> 3 g4 g3 0.8103065
#> 4 g16 g15 0.7659245
#> 5 g17 g16 0.7558764
#> 6 g12 g11 0.7444053
head(network_table_new)
#> regulator target weight
#> 1 g18 g1 -0.9223177
#> 2 g17 g18 0.8770468
#> 3 g4 g3 0.8103065
#> 4 g16 g15 0.7659245
#> 5 g17 g16 0.7558764
#> 6 g12 g11 0.7444053
identical(
network_table,
network_table_new
)
#> [1] TRUE