Repository navigation
Wagebill analytics - #101
Merged
Merged
Conversation
- Implement `.compute_decrement_pair()` to compute exit/stay outcome counts between consecutive snapshot pairs - Implement `estimate_decrement_rates()` (exported) to pool decrement rates across all snapshot pairs in a panel - Implement `.smooth_rate_curve()` and `smooth_decrement_rates()` to graduate and gap-fill rates via loess/linear interpolation - Implement `compute_service_table()` to chain smoothed decrement rates into a multiple-decrement actuarial service table (lx, Lx, Tx, ex) - Register new global variable bindings in zzz.R - Add generated documentation and NAMESPACE export for `estimate_decrement_rates`
…exp` column to `ex`, update docs, and add tests
Audit every @importFrom tag against what the package actually exports and what each file actually calls. - Remove four `@importFrom govhr` self-imports; a package cannot import from itself. - Point the ggthemes tag at `scale_colour_few()`, the spelling the code calls. - Drop the unused `@importFrom validate` tag. `description` and `label` there were never validate functions but data.table column names, and the tag made `validate::summary()` mask `base::summary()` package-wide. - Drop dead tags: `glue`, `tidyr::pivot_longer`, `grid::unit`, `ggplot2::arrow`/`position_jitter`, `data.table::.SD`, `dplyr::collect`, `across`/`everything`/`summarise`, `select`, `tibble::as_tibble`, `lubridate::years`. Tests: 596 pass, 0 failures. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The sources already contained 518 backticks, 30 markdown lists and 9 *emphasis* spans, but markdown was never switched on, so all of it rendered as literal characters and bullet lists collapsed into run-on paragraphs. Enabling it regenerates 105 of 125 help files; all 124 Rd files still pass tools::checkRd(). Also fix six @PARAM entries that documented the wrong arity: `group_cols` was described as "a character string" on compute_workforce_movement(), plot_movement(), plot_decile(), plot_compression_ratio() and plot_movement_cost(), and `group_col` as "a character vector" on compute_density(), which errors on two columns. Tests: 596 pass, 0 failures. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The tidyverse reserves a dotted `.data` for functions that also take `...`, so user column names cannot collide with the argument. Only 3 of 73 functions here take `...`, and they straddled both conventions, so the 37/36 split between `data` and `.data` tracked nothing. Rename `.data` to `data` on the 34 functions without `...`, and give ggplot_point_line() the dotted name it should have had. compute_baseline_index() and fastprop() keep `.data`. `.data` is also the rlang pronoun, so the rename was driven off getParseData() token positions rather than text matching: 104 argument references were renamed and 97 pronoun uses inside data-masked calls (aes(), vars(), dplyr verbs) were left alone. The data argument of a masking call is not itself masked, which is what made `fastcount(.data, ...)` and `dplyr::filter(.data, ...)` argument references rather than pronouns. Tests: 596 pass, 0 failures. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Grouping arguments carried four names for one concept: group_cols (20),
group (13), group_col (10) and groups (3). The _col/_cols suffix was
sound where used, so keep it and retire the bare forms, assigning each
function the suffix its actual arity demands. Arity was verified by
calling each function with one and two columns rather than trusting the
docs, which were wrong in both directions.
Also drop storage-type suffixes from argument names: personnel_dt ->
personnel, contract_dt/contract_df -> contracts, event_dt -> events,
decrement_dt -> decrements, est_dt -> establishments. The suffix was a
false promise; all of these accept a plain data.frame or tibble.
Old names still work via resolve_renamed_arg(), which warns and errors
if both names are supplied. ggplot_point_line(), ggplot_segment() and
sample_group() are renamed without a shim because their arguments are
evaluated lazily ({{ }} / enquo() / ensym()), which a forcing shim
cannot forward.
Call sites were rewritten off parse-tree positions so that aes(group =),
data.frame(group =) and dplyr's .groups were left untouched.
This also applies the tidyverse documentation style to the same roxygen
blocks: sentence-case titles, @return -> @returns, and @PARAM
descriptions that start with a capital and end with a full stop.
Tests: 605 pass (596 existing plus 9 new deprecation tests), 0 failures,
0 warnings.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Rewrite call sites in the vignettes and the pkgdown assessment article off parse-tree positions, and update the prose that names the `group` argument. ggplot_point_line() and ggplot_segment() calls in the assessment article passed bare symbols to `group`, which has no deprecation shim, so those had to change. Several plot_trend() calls were reaching `group_col` only through R's partial argument matching; they now name it in full. All four vignettes render, and the rendered text is identical to the pre-change output apart from the argument names shown in code. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
ifeanyi588
approved these changes
Sep 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR: