n.sources: Identify source and sink nodes

View source: R/sources.R

n.sourcesR Documentation

Identify source and sink nodes

Description

Identify the number of sources and the source nodes. Sources are assumed to be linked to the sink.

Usage

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.

Value

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")

streamDAG documentation built on Oct. 7, 2023, 1:08 a.m.