View source: R/company_hierarchy.R
aggregate_hierarchy_value | R Documentation |
Adds an aggregate value to the vertices of a company hierarchy
aggregate_hierarchy_value(graph, name_attribute, name_aggregate, FUN, ...)
graph |
A graph |
name_attribute |
The name of the value attribute to be aggregated |
name_aggregate |
The name of the attribute where the aggregated value is stored |
FUN |
the function which is used to calculate aggregated |
... |
The parameters passed to the function specified in FUN |
A graph where all the nodes contain aggregated value
graph <- aggregate_hierarchy_value(graph, name_attribute = "qty_employees", name_aggregate = "qty_employees_cum", FUN = sum, na.rm = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.