Description Usage Arguments Details Examples
Given a btree, determine the depth of each node
1 | node_depths(btree, nodeIds = NULL)
|
btree |
A btree object |
nodeIds |
Optionally a vector of node Ids corresponding to nodes in btree |
Returns a vector of node depths, with root node depth = 0
1 2 3 4 | library(data.table)
btree1 <- make_btree(nodeIds=c(1,2,3,4,5,6,7), parentNodeIds=c(NA,1,1,2,2,3,3))
node_depths(btree1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.