simplegraph (version 1.0.0)

predecessors: Predecessors and successors

Description

Predecessors and successors

Usage

predecessors(graph)

successors(graph)

Value

Named list of character vectors, the predecessors or the successors of each vertex.

Arguments

graph

Input graph

Examples

Run this code
G <- graph(list(A = c("B", "C"), B = "C", C = "A"))
predecessors(G)
successors(G)

Run the code above in your browser using DataCamp Workspace