btree_paths: btree Paths

Description Usage Arguments Details Examples

Description

Given a btree, produce a vector of strings indicating the directed steps to take starting at the root to get to each node

Usage

1
btree_paths(btree)

Arguments

btree

A btree

Details

Returns a character vector whose values correspond to each node in the btree

Examples

1
2
3
library(data.table)
mytree <- data.table(NodeId=c(1, 2, 3), ParentNodeId=c(NA, 1, 1))
btree_paths(mytree)

ben519/btree documentation built on May 12, 2019, 10:56 a.m.