get_leaves_under: Get the leaf nodes of a graph under some nodes

View source: R/get_leaves.R View source: R/extendr-wrappers.R View source: R/extendr-wrappers.R

get_leaves_underR Documentation

Get the leaf nodes of a graph under some nodes

Description

Retrieves the nodes in a graph that have no children under a certain node or group of nodes

Usage

get_leaves_under(graph, nodes)

Arguments

graph

A graph object

nodes

A character vector of nodes to find leaves for

Value

A character vector of nodes

See Also

Other analyze graphs: find_all_paths(), find_path(), find_path_one_to_many(), get_all_leaves(), get_all_roots(), get_roots_over(), least_common_parents()

Examples

graph <- graph_builder() |>
  add_path(c("A", "B", "C")) |>
  add_path(c("A", "D", "C")) |>
  add_path(c("Z", "B", "C")) |>
  add_path(c("Z", "B", "H")) |>
  build_directed()

get_leaves_under(graph, "D")

orbweaver documentation built on June 8, 2025, 11:40 a.m.