getDescendants: Get descendants of nodes in a graph.

View source: R/ancestralID.R

getDescendantsR Documentation

Get descendants of nodes in a graph.

Description

Gets the descendants of a collection of nodes in a graph (all nodes that can be reached by following directed edges from those nodes). Descendants DO include the nodes themselves.

Usage

getDescendants(g, nodes)

Arguments

g

the graph (as an igraph).

nodes

the nodes in the graph of which to get the descendants.

Value

a sorted vector of all descendants of nodes.


Lucaweihs/SEMID documentation built on July 22, 2023, 7:49 a.m.