View source: R/company_hierarchy.R
propagate_hierarchy_value | R Documentation |
Adds an aggregate value to the vertices of a company hierarchy, in which you can vary it's direction and distance
propagate_hierarchy_value(graph, name_attribute, name_propagate,
distance = 1, direction = "in", FUN, ...)
graph |
A graph |
name_attribute |
The name of the value attribute to be aggregated |
name_propagate |
The name of the attribute where the aggregated value is stored |
distance |
The number of 'hops' in the company network that should be included, default = 1 |
direction |
The direction to calculate the propagated value from (can be "in", "out", "all") |
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 <- propagate_hierarchy_value(graph, name_attribute = "qty_employees", name_propagate = "qty_employees_cum", distance = 1, direction = "in", FUN = sum, na.rm = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.