Identify source and sink nodes
Identify the number of sources and the source nodes. Sources are assumed to be linked to the sink.
n.sources(G, sink = NULL) sources(G, sink = NULL)
G
: A graph object of class "igraph", see graph_from_literal
sink
: The name of the sink node.Returns a character vector listing streamDAG source nodes (those linked to the sink with indegree 0).
Ken Aho, Gabor Csardi wrote degree
sources(streamDAGs("konza_full"), sink = "SFM01_1")
Useful links