R/get_children.R
get_all_descendants.Rd
Get all descendants from a single node in a tree
get_all_descendants(x, ...)
The tree to extract the node from.
The node index to extract children from.
The children of node node_index, as an integer vector.
node_index
tree() |> add_node() |> add_node(parent = 1L) |> add_node(parent = 2L) |> get_all_descendants(1L) #> [1] 1 2 3