| Type: | Package | 
| Title: | Better Data Engineering in Human Resources | 
| Version: | 0.3.0 | 
| Author: | Dale Kube [aut, cre] | 
| Maintainer: | Dale Kube <dkube@uwalumni.com> | 
| Description: | Methods for data engineering in the human resources (HR) corporate domain. Designed for HR analytics practitioners and workforce-oriented data sets. | 
| BugReports: | https://github.com/dalekube/hR/issues | 
| Encoding: | UTF-8 | 
| License: | GPL-2 | GPL-3 [expanded from: GPL] | 
| LazyData: | true | 
| RoxygenNote: | 7.3.2 | 
| Imports: | data.table, knitr | 
| Depends: | R(≥ 2.10) | 
| Suggests: | rmarkdown | 
| VignetteBuilder: | knitr | 
| NeedsCompilation: | no | 
| Packaged: | 2025-03-16 14:43:48 UTC; dale | 
| Repository: | CRAN | 
| Date/Publication: | 2025-03-16 15:00:02 UTC | 
hierarchy
Description
The hierarchy function transforms a standard set of unique employee and supervisor identifiers (employee IDs, email addresses, etc.) into a wide or elongated format that can be used to aggregate employee data by a particular line of leadership (i.e. include everyone who rolls up to Susan).
Usage
hierarchy(ee, supv, format = "long", descending = TRUE)
Arguments
| ee | A vector containing unique identifiers for employees. | 
| supv | A vector containing unique identifiers for supervisors. These values should be of the same type as the employee values. | 
| format | character string; either "long" or "wide"; default = "long". | 
| descending | logical; default = TRUE. Should the hierarchy levels be descending (i.e. the top person in the hierarchy is represented at level 1)? | 
Value
data table
Examples
ee = c("Dale@hR.com","Bob@hR.com","Julie@hR.com","Andrea@hR.com")
supv = c("Julie@hR.com","Julie@hR.com","Andrea@hR.com","Susan@hR.com")
hierarchy(ee,supv,format="long",descending=TRUE)
hierarchyStats
Description
The hierarchyStats function computes summary statistics and span of control metrics from a standard set of unique employee and supervisor identifiers (employee IDs, email addresses, etc.).
Usage
hierarchyStats(ee, supv)
Arguments
| ee | A vector containing unique identifiers for employees. | 
| supv | A vector containing unique identifiers for supervisors. These values should be of the same type as the employee values. | 
Value
list
Examples
ee = c("Dale@hR.com","Bob@hR.com","Julie@hR.com","Andrea@hR.com")
supv = c("Julie@hR.com","Julie@hR.com","Andrea@hR.com","Susan@hR.com")
hierarchyStats(ee,supv)
hierarchyValid
Description
The hierarchyValid function considers a standard set of unique employee and supervisor identifiers (employee IDs, email addresses, etc.) and validates the completeness and quality of the two input vectors representing the overall hierarchy.
Usage
hierarchyValid(ee, supv)
Arguments
| ee | A vector containing unique identifiers for employees. | 
| supv | A vector containing unique identifiers for supervisors. These values should be of the same type as the employee values. | 
Value
logical
Examples
ee = c("Dale@hR.com","Bob@hR.com","Julie@hR.com","Andrea@hR.com")
supv = c("Julie@hR.com","Julie@hR.com","Andrea@hR.com","Susan@hR.com")
hierarchyValid(ee,supv)
Workforce history data for a sample team of employees and contractors.
Description
Artificial data that reflects the workforce history data structure often used to manage employment records in a human capital management system (HCM). Modern enterprises store data in this format at the core of their HCM. This data is the root source of all data analysis and reporting related to headcount, hiring, turnover, etc.
Usage
data(workforceHistory)
Format
A data table with 45 rows and 10 variables:
- DATE
- Effective date of the record 
- SEQ
- Effective sequence of the record (used to manage multiple records for the same effective date) 
- ACTION
- Action 
- EMPLID
- Employee ID 
- SUPVID
- Supervisor ID 
- TYPE
- Employee type (employee or contractor) 
- REGTEMP
- Regular, temporary, or contract employment 
- TITLE
- Job title 
- STATUS
- Employment status 
- NAME
- Employee name 
...