Skip to contents

This function converts an adjacency matrix to a data frame of network links, subset to the most important ones.

Usage

get_link_list_rename(weightMat, plotConnections)

Arguments

weightMat

the (weighted) adjacency matrix - regulators in rows, targets in columns

plotConnections

the number of connections to subset to

Value

A data frame with fields from, to and value, describing the edges of the network

Examples

weightMat <- matrix(
  c(0.1, 0.4, 0.8, 0.3), nrow = 2, ncol = 2,
  dimnames = list("regulators" = c("r1", "r2"), "targets" = c("t1", "t2"))
)
get_link_list_rename(weightMat, 2)
#>   from to value
#> 1   r1 t2   0.8
#> 2   r2 t1   0.4