Description Usage Arguments Details Examples
Helper method for validating a data.table object as a btree by checking for one root.
1 | has_one_root(btree)
|
btree |
A data.table object with field |
Returns TRUE
if field ParentNodeId
has exactly 1 NA value.
1 2 3 | library(data.table)
mytree <- data.table(NodeId=c(1, 2, 3), ParentNodeId=c(NA, 1, 1))
has_one_root(mytree)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.