Repository navigation
Fix/rename uncond exact diff method - #1547
Open
gwangjinkim wants to merge 2 commits into
Open
gwangjinkim wants to merge 2 commits into
gwangjinkim wants to merge 2 commits into
Conversation
…act" (pharmaverse#1534) The `_diff` suffix made the statistic names awkward (`diff_ci_uncond_exact_diff_l`) and was inconsistent with the other methods and with `prop_diff_uncond_exact()`. The method is now `"uncond_exact"`, giving `diff_uncond_exact` and `diff_ci_uncond_exact_l` / `_u`. Since `"uncond_exact_diff"` was released in 0.9.11, it is still accepted by `s_proportion_diff()` (and therefore `estimate_proportion_diff()`), but gives a lifecycle deprecation warning and is mapped to the new name. `d_proportion_diff()` keeps describing the old name. Updates the docs, vignette, error messages, NEWS, and tests (including coverage of the deprecated alias). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Hu112DJEVzgWdVGVuiYj7x
`identical(method, "uncond_exact_diff")` is FALSE for a named scalar such as `config["method"]`, which `match.arg()` used to accept. Such a value then skipped the compatibility mapping and was rejected by the new choices. Compare the value with `isTRUE(method == ...)` instead, and cover the named case in the deprecation test. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Hu112DJEVzgWdVGVuiYj7x
This branch has not been deployed
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.
Pull Request
Fixes #1534
Summary
Renames the proportion difference method
"uncond_exact_diff"to"uncond_exact"inestimate_proportion_diff()ands_proportion_diff(). The statistic names becomediff_uncond_exactanddiff_ci_uncond_exact_l/_u(previouslydiff_ci_uncond_exact_diff_l/_u), consistent with the other methods and withprop_diff_uncond_exact().Because
"uncond_exact_diff"was released in 0.9.11 and 0.9.12, it is not removed: it is still accepted, gives alifecycledeprecation warning, and is mapped to"uncond_exact".Changes
R/prop_diff.R: new default method choices;s_proportion_diff()accepts the deprecated name and converts it (soestimate_proportion_diff()is covered too, including named scalars);d_proportion_diff()describes both names without warning; docs and error messages updated.man/prop_diff.Rdand theuncond_exact_prop_diff_ci.Rmdvignette updated.NEWS.md: entry under "Deprecations".d_proportion_diff()labels.Notes
Anyone who referred to the old statistic names (e.g.
diff_ci_uncond_exact_diff_l) will see them change. That is the intent of the issue, but it may deserve a mention in the release notes.Testing
test-prop_diff.R: 51/51 pass with no warnings;test-test_proportion_diff.Randtest-utils_split_fun.Ralso pass. Lint and style are clean.