hierarchyLong: hierarchyLong

Description Usage Arguments Value Examples

View source: R/hierarchyLong.R

Description

This function takes employee and supervisor identifiers (name, ID, etc.) and returns a long data frame consisting of one row per employee for every supervisor above them, up to the CEO.

The resulting format is useful for quickly filtering to a specific part of the workforce that directly and indirectly reports up through a particular leader.

Usage

1
hierarchyLong(ee, supv)

Arguments

ee

A list of values representing employees (e.g. employee IDs).

supv

A list of values representing the supervisors of the employees. These values should be of the same type as the employee values.

Value

data frame

Examples

1
2
3
ee = c("Dale","Bob","Julie","Susan")
supv = c("Julie","Julie","Susan","George")
hierarchyLong(ee,supv)

dalekube/hR documentation built on Feb. 13, 2018, 3:04 p.m.