# NOT RUN {
#### create a tree
dst1 <- node_new("firm1")
print(dst1)
## create a tree with children
dst <- node_new(
"firm",
"lab", "cap", dst1
)
print(dst)
#### create a tree with attributes
dst <- node_new("firm",
type = "CD", alpha = 1, beta = c(0.5, 0.5)
)
node_print(dst)
#### create a tree with attributes and children
dst <- node_new("firm",
type = "CD", alpha = 1, beta = c(0.5, 0.5),
"lab", "cap"
)
node_print(dst)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab