
Detect Personnel Reallocation Events
detect_reallocation.RdIdentifies reallocation events when a personnel's set of establishments changes between consecutive reference dates. Removes hire events and only keeps reallocation events after the earliest reference date for each personnel.
Arguments
- data
A data.frame or tibble containing at least the columns: - `personnel_id`: Unique personnel identifier. - `ref_date`: Reference date (Date or convertible to Date). - `est_id`: Establishment ID.
- personnel_hire
A data.frame or tibble containing hire events with columns `personnel_id` and `ref_date`.