I created a data.tree and now I want to add a specific number of the nodes such that.. Oh leave it, I will give example......
CEO
2 ¦--CXO N-2
3 ¦ ¦--HOD N-3
4 ¦ ¦ ¦--Manager N-4
5 ¦ ¦ ¦ ¦--Resource N-5
6 ¦ ¦ ¦ ¦--Resource N-5
You see how the alphanumeric coding changes as the node change.
You can use the original acme dataset to give this out to me.
library (data.tree)
data(acme)
As I did research, I found Node$Set, probably it has something to do with assigning characters/numerics to nodes, but sadly I am unable to figure out how.
# node$Set(...,
# traversal = c("pre-order", "post-order", "in-order", "level", "ancestor"),
# pruneFun = NULL,
# filterFun = NULL)
#traditional:
Set(nodes, ...)
Please note I have found similar question, but it adds incremental value to every node instead of giving values to specific node and also understand I want to add alphanumeric...