Skip to contents

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.

Usage

tree_root_kind(tree)

Arguments

tree

(RTree)
A tree as returned by build_tree().

Value

character(1)

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"