R: Convert igraph graph into an adjacency list

graphToAdjList {sccore} | R Documentation

## Convert igraph graph into an adjacency list

### Description

Convert igraph graph into an adjacency list

### Usage

    graphToAdjList(graph)

### Arguments

`graph` | input igraph object

### Value

adjacency list, defined by list(idx=adj.list, probabilities=probs, names=edge.list.fact$levels

### Examples

    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)

[Package sccore version 1.0.1 Index]