Description Usage Arguments Value
This function takes a commodity tree and a vector of node ids and returns a vector of these nodes as well as all the descendants (or ancestors) of these nodes.
1 2 | getChildren(commodityTree, parentColname, childColname, topNodes,
parentFlag = TRUE)
|
commodityTree |
A data.table with parent and child node IDs (corresponding to the IDs in nodes) which specify the commodity tree structure. |
parentColname |
The column name of commodityTree which contains the ID of the parent node. |
childColname |
The column name of commodityTree which contains the ID of the child node. |
topNodes |
Vector containing the node names/ids for which the children are sought. |
parentFlag |
Logical. If TRUE (default) this function gets all descendants. If FALSE, it gets all ancestors. |
A numeric vector containing topNodes as well as all descendants (or ancestors) of topNodes.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.