View source: R/node_methods_sideeffect.R
Prune | R Documentation |
Pruning refers to removing entire subtrees. This function has side-effects, it modifies your data.tree structure!
Prune(node, pruneFun)
node |
The root of the sub-tree to be pruned |
pruneFun |
allows providing a prune criteria, i.e. a function taking a |
the number of nodes removed
Node
data(acme)
acme$Do(function(x) x$cost <- Aggregate(x, "cost", sum))
Prune(acme, function(x) x$cost > 700000)
print(acme, "cost")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.