Skip to contents

This function takes a tree created by tree_new() and returns the root node containing all subsequent nodes.

Usage

tree_root(x)

Arguments

x

A tree created by tree_new().

Examples

src <- "x <- rnorm(100, mean = 2)
    any(duplicated(y))
    plot(x)
    any(duplicated(x))"

tree <- tree_new(src)
tree_root(tree)
#> <AST node>