Switch matrix to network table

matrix_to_table(network_matrix, regulators = NULL, targets = NULL)

Arguments

network_matrix

The matrix of network weight.

regulators

Regulators list.

targets

Targets list.

Value

Network table

Examples

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