aggregate_hierarchy_value: Adds an aggregate value to the vertices of a company...

View source: R/company_hierarchy.R

aggregate_hierarchy_valueR Documentation

Adds an aggregate value to the vertices of a company hierarchy

Description

Adds an aggregate value to the vertices of a company hierarchy

Usage

aggregate_hierarchy_value(graph, name_attribute, name_aggregate, FUN, ...)

Arguments

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

Value

A graph where all the nodes contain aggregated value

Examples

graph <- aggregate_hierarchy_value(graph, name_attribute = "qty_employees", name_aggregate = "qty_employees_cum", FUN = sum, na.rm = TRUE)

mark-me/graydon.package documentation built on Nov. 14, 2023, 5:31 p.m.