Package 'hR'

Title: Toolkit for Data Analytics in Human Resources
Description: Transform and analyze workforce data in meaningful ways for human resources (HR) analytics. Get started with workforce planning using a simple Shiny app.
Authors: Dale Kube [aut, cre]
Maintainer: Dale Kube <[email protected]>
License: GPL
Version: 0.2.5
Built: 2025-03-01 06:23:01 UTC
Source: https://github.com/dalekube/hr

Help Index


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("[email protected]","[email protected]","[email protected]","[email protected]")
supv = c("[email protected]","[email protected]","[email protected]","[email protected]")
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("[email protected]","[email protected]","[email protected]","[email protected]")
supv = c("[email protected]","[email protected]","[email protected]","[email protected]")
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("[email protected]","[email protected]","[email protected]","[email protected]")
supv = c("[email protected]","[email protected]","[email protected]","[email protected]")
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

...


workforcePlan

Description

Launch a simple, interactive workforce planning worksheet that helps managers and team leaders to execute basic workforce planning tasks and plan ahead for hiring, turnover, and other factors that influence a team's talent structure. Data analysts can use this alongside team leaders to convey change and proactively think about recruitment, etc.

Usage

workforcePlan(launch.browser = T)

Arguments

launch.browser

Logical; whether the app should launch in the user's default browser