Extract nodes values from a tree
Arguments
- x
The tree to extract node values from.
- node_indices
The index of nodes to extract from the tree.
Value
A list of node values.
Examples
tree() |>
add_node() |>
add_node(parent = 1L, value = list("value one!")) |>
add_node(parent = 2L, value = list("value two!")) |>
get_node_values(c(2, 3))
#> [[1]]
#> [[1]][[1]]
#> [1] "value one!"
#>
#>
#> [[2]]
#> [[2]][[1]]
#> [1] "value two!"
#>
#>