sources: Identify sources in a directed graph

Description Usage Arguments Details Author(s) Examples

View source: R/sources.R

Description

From a directed graph, this function returns all source nodes, or nodes which only act as head nodes and not as tail nodes.

Usage

1
sources(graph)

Arguments

graph

a directed graph (igraph).

Details

sources returns a numerical vector of source nodes.

Author(s)

Christopher Nobles, Ph.D.

Examples

1
2
g <- make_graph(edges = c(1,2, 2,3, 1,3), directed = TRUE)
sources(g)

cnobles/gintools documentation built on Aug. 22, 2019, 10:36 a.m.