View source: R/node_methods_traversal.R
Set | R Documentation |
The method takes one or more vectors as an argument. It traverses the tree, whereby the values are picked
from the vector. Also available as OO-style method on Node
.
#OO-style:
# node$Set(...,
# traversal = c("pre-order", "post-order", "in-order", "level", "ancestor"),
# pruneFun = NULL,
# filterFun = NULL)
#traditional:
Set(nodes, ...)
nodes |
The nodes on which to perform the Get (typically obtained via |
... |
each argument can be a vector of values to be assigned. Recycled. |
invisibly returns the nodes (useful for chaining)
Node
Get
Do
Traverse
data(acme)
acme$Set(departmentId = 1:acme$totalCount, openingHours = NULL, traversal = "post-order")
acme$Set(head = c("Jack Brown",
"Mona Moneyhead",
"Dr. Frank N. Stein",
"Eric Nerdahl"
),
filterFun = function(x) !x$isLeaf
)
print(acme, "departmentId", "head")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.