
Function to compute workforce movement for hires, fires, retirement, or turnover
compute_workforce_movement.RdFunction to compute workforce movement for hires, fires, retirement, or turnover
Arguments
- data
A data frame containing personnel data.
- movement_type
A string indicating the type of movement: "hire", "fire", "retirement", or "turnover".
- measurement_type
A string indicating the measurement type: "count" or "rate". Ignored for turnover, which is a ratio.
- group_cols
A character vector of columns to group by, or
"ref_date"for no grouping.
Details
The function computes workforce movement counts or rates, based on the specified movement type. For hires, fires, and retirements, it calculates either the count or rate of events. For turnover, it calculates the ratio of hires to separations (including retirements). The data is grouped by the specified columns.