The kind of a tree's root node: "leaf" for a single leaf, "list" for a
list node, or "null" for the empty (NULL) node.
Arguments
- tree
(
RTree)
A tree as returned bybuild_tree().
Examples
tree_root_kind(build_tree(1))
#> [1] "leaf"
tree_root_kind(build_tree(list(1)))
#> [1] "list"
tree_root_kind(build_tree(NULL))
#> [1] "null"