powered by
Convert adjacency matrix to an adjacency list
adjacencyMatrix2List(mat, keep.zero = FALSE)
A numeric matrix.
Whether to keep the interactions with value zero.
set.seed(999) mat = matrix(sample(18, 18), 3, 6) rownames(mat) = paste0("S", 1:3) colnames(mat) = paste0("E", 1:6) adjacencyMatrix2List(mat)
Run the code above in your browser using DataLab