This function transforms a standard set of employee and supervisor identifiers into a long format representing full hierarchies. This is especially useful for narrowing in on a subset of the workforce that reports up to a single person. The function returns a long data frame consisting of one row per employee for every supervisor above them, up to the CEO. The levels represent the number of supervisors from the employee (starting with "1" for an employee's direct supervisor).
A list of values representing employees (e.g. employee IDs).
A list of values representing the supervisors of the employees. These values should be of the same data type as the employee values.
1 2 3
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.