| update_rollup | R Documentation |
update_rollup() performs a minimal update of a data set assuming a single leaf element property
has changed. It performs updates along the path from that vertex to the root. There should be no difference
in the output from calling rollup() again. update_rollup() is perhaps more efficient and useful in an interactive context.
update_rollup(tree, ds, vertex, update)
tree |
|
ds |
data set to be updated; can be any object |
vertex |
The start vertex |
update |
function called at each vertex as update(ds, parent_key, child_keys) |
updated input data set
update_rollup(wbs_tree, wbs_table, igraph::V(wbs_tree)["3.2"],
update = function(d, p, c) {
if (length(c) > 0)
d[d$id == p, c("work", "budget")] <-
apply(d[is.element(d$id, c), c("work", "budget")], 2, sum)
d
}
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.