sum_up_tree: Sum Property Up Tree

Description Usage Arguments Details Value

View source: R/tree_funs.r

Description

Recursive function to be applied to a tree node, will *sum* a specified quantity from all child nodes, and grandchildren etc

Usage

1
sum_up_tree(node, property)

Arguments

node

data.tree node, for which a specified quantity is aggregated

property

name of a property to be aggregated

Details

Does this by calling itself on the $children of a node. Once it reaches a leaf, there are no children.

Works as a side effect, output does not need to be assigned

Value

a data.tree with <property>_agg as a property


mattmalcher/gov.uk.taxonomy documentation built on Jan. 25, 2020, 12:45 a.m.