as_adj_list

0th

Percentile

Adjacency lists

Create adjacency lists from a graph, either for adjacent edges or for neighboring vertices

Keywords
graphs
Usage
as_adj_list(graph, mode = c("all", "out", "in", "total"))

as_adj_edge_list(graph, mode = c("all", "out", "in", "total"))

Arguments
graph
The input graph.
mode
Character scalar, it gives what kind of adjacent edges/vertices to include in the lists. out is for outgoing edges/vertices, in is for incoming edges/vertices, all i
Details

as_adj_list returns a list of numeric vectors, which include the ids of neighbor vertices (according to the mode argument) of all vertices.

as_adj_edge_list returns a list of numeric vectors, which include the ids of adjacent edgs (according to the mode argument) of all vertices.

Value

  • A list of numeric vectors.

See Also

as_edgelist, as_adj

Aliases
  • as_adj_edge_list
  • as_adj_list
  • get.adjedgelist
  • get.adjlist
Examples
g <- make_ring(10)
as_adj_list(g)
as_adj_edge_list(g)
Documentation reproduced from package igraph, version 1.0.0, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.