n.sources function

Identify source and sink nodes

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)

Arguments

  • G: A graph object of class "igraph", see graph_from_literal
  • sink: The name of the sink node.

Returns

Returns a character vector listing streamDAG source nodes (those linked to the sink with indegree 0).

Author(s)

Ken Aho, Gabor Csardi wrote degree

Examples

sources(streamDAGs("konza_full"), sink = "SFM01_1")
  • Maintainer: Ken Aho
  • License: GPL (>= 2)
  • Last published: 2025-01-14

Useful links