View source: R/graph_structures.R
| as_adj_list1 | R Documentation |
Create adjacency lists from a graph, either for adjacent edges or for neighboring vertices. This version is faster than the version of igraph but less general.
as_adj_list1(g)
g |
An igraph object |
The function does not have a mode parameter and returns the same neighbors as as_adj_list(g, mode = "all"), as plain integer vectors. For directed graphs, both in- and out-neighbors are returned.
A list of numeric vectors.
David Schoch
library(igraph)
g <- make_ring(10)
as_adj_list1(g)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.