Learn R Programming

forestry (version 0.1.1)

create_tree: create tree appended with each element of input list as a child

Description

create tree appended with each element of input list as a child

Usage

create_tree(input_list, node_name)

Value

a tree with each item of the list as each child

Arguments

input_list

input list to be made for a tree

node_name

name of the tree

Examples

Run this code
data("test_df")
test_node <- data.tree::as.Node(test_df)
new_shape <- create_tree(test_node$children,"new_tree")
print(new_shape, "hc")

Run the code above in your browser using DataLab