View source: R/graph_embedding.R
graphToAdjList | R Documentation |
Convert igraph graph into an adjacency list
graphToAdjList(graph)
graph |
input igraph object |
adjacency list, defined by list(idx=adj.list, probabilities=probs, names=edge.list.fact$levels
library(dplyr)
edge.list.fact <- igraph::as_edgelist(conosGraph) %>% as_factor()
edge.list <- matrix(edge.list.fact$values, ncol=2)
n.nodes <- length(igraph::V(conosGraph))
splitVectorByNodes(edge.list[,1], edge.list[,2], n.nodes)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.