A vertex is adjacent is it is either a successor, or a predecessor.
adjacent_vertices(graph)
A named list of character vectors, the adjacent vertices for each vertex.
The graph.
Other simple queries: edges, order, vertices
edges
order
vertices
G <- graph(list(A = c("B", "C"), B = "C", C = "A")) adjacent_vertices(G)
Run the code above in your browser using DataLab