Fix CRAN issues, add test suite, and fix correctness bugs#1
Merged
Conversation
Resolves the three CRAN reviewer issues and hardens the package with a
real test suite and several correctness fixes. R CMD check --as-cran
--run-donttest is clean (0 errors, 0 warnings, 1 expected dev-version NOTE).
CRAN compliance:
- DESCRIPTION: add method references with 9 verified DOIs/ISBN; bump to
0.14.1.9000.
- pipe.Rd: add \value (was the only missing \value tag).
- Convert all 7 \dontrun examples to \donttest on the bundled
nhanes_mortality data (examples no longer need the NHANES Suggests pkg).
- Strengthen every \value to name the actual runtime class and meaning
(e.g. svypooled is c("kableExtra","knitr_kable")).
Correctness fixes:
- svygof: attach decile groups to the existing design via stats::update()
instead of rebuilding a bare svydesign; preserves fpc/calibration and now
works on replicate designs (previously errored). Fix the example, which
called svyAUC, and the @param design doc.
- svyAUC: replace hardcoded 1.96 with a design-df qt() critical value and
build the CI on the logit scale so it stays within [0,1]; remove dead code.
- svycoxph_CE_mi: default time_var/status_var followup/death -> stime/status
(the old defaults did not exist in the bundled data).
- svytable1: error on a 0-row design instead of returning a fake table;
stop flooring the design effect at 1 (was over-suppressing deff<1 cells).
- README: rewrite to the real APIs on bundled data (the Cox and plotint
examples documented signatures that do not exist); every snippet verified.
New functionality:
- svykmplot gains an `se` argument (default TRUE). se = FALSE skips the slow
survey-weighted CI bands (28s -> 0.3s on the example data).
Testing & hygiene:
- Replace the trivial smoke test with a real testthat suite: 67 passing
assertions across descriptive tables, diagnostics, additive interaction
(tightly pinned pure-math RERI/AP/S), survival, and MI pooling, rooted on
the bundled data with edge-case coverage.
- Clean up .data$ usage inside tidyselect verbs (removes ~258 deprecation
warnings); gate addintlist progress messages behind verbose.
- Untrack R/.Rhistory; ignore *.Rhistory and Rplots.pdf; fix URL trailing
slash; keep NEWS.md/cran-comments.md out of the *.md gitignore.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Resolves the three CRAN reviewer issues and hardens the package with a real test suite and several correctness fixes. R CMD check --as-cran --run-donttest is clean (0 errors, 0 warnings, 1 expected dev-version NOTE).
CRAN compliance:
Correctness fixes:
New functionality:
seargument (default TRUE). se = FALSE skips the slow survey-weighted CI bands (28s -> 0.3s on the example data).Testing & hygiene: