Skip to content

Set default digits for tbl_roche_summary()#139

Merged
shajoezhu merged 12 commits intomainfrom
138-tbl_roche_summary_digits
Nov 28, 2025
Merged

Set default digits for tbl_roche_summary()#139
shajoezhu merged 12 commits intomainfrom
138-tbl_roche_summary_digits

Conversation

@edelarua
Copy link
Copy Markdown
Contributor

@edelarua edelarua commented Nov 26, 2025

What changes are proposed in this pull request?

  • Added digits defaults to tbl_roche_summary() that utilize the label_roche_*() functions and estimate number of digits for each variable. Also affects functions that call tbl_roche_summary() internally.

Variable decimal places estimated according to guidelines in "TLG General Reporting Conventions" document.

Closes #138


Pre-review Checklist (if item does not apply, mark is as complete)

  • All GitHub Action workflows pass with a ✅
  • PR branch has pulled the most recent updates from master branch: usethis::pr_merge_main()
  • If a bug was fixed, a unit test was added.
  • Code coverage is suitable for any new functions/features (generally, 100% coverage for new code): devtools::test_coverage()
  • Request a reviewer

Reviewer Checklist (if item does not apply, mark is as complete)

  • If a bug was fixed, a unit test was added.
  • Run pkgdown::build_site(). Check the R console for errors, and review the rendered website.
  • Code coverage is suitable for any new functions/features: devtools::test_coverage()

When the branch is ready to be merged:

  • Update NEWS.md with the changes from this pull request under the heading "# cards (development version)". If there is an issue associated with the pull request, reference it in parentheses at the end update (see NEWS.md for examples).
  • All GitHub Action workflows pass with a ✅
  • Approve Pull Request
  • Merge the PR. Please use "Squash and merge" or "Rebase and merge".

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Nov 26, 2025

Unit Tests Summary

  1 files   68 suites   1m 29s ⏱️
 68 tests  68 ✅ 0 💤 0 ❌
166 runs  166 ✅ 0 💤 0 ❌

Results for commit ddd1735.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Nov 26, 2025

Unit Test Performance Difference

Additional test case details
Test Suite $Status$ Time on main $±Time$ Test Case
tbl_roche_summary 👶 $+0.00$ tbl_roche_summary_digit_estimation_works
tbl_roche_summary 💔 $6.40$ $+1.23$ tbl_roche_summary_works

Results for commit 5925bba

♻️ This comment has been updated with latest results.

@edelarua edelarua marked this pull request as draft November 26, 2025 00:44
@edelarua edelarua changed the title Set default digits for tbl_roche_summary() Set default digits for tbl_roche_summary() and tbl_baseline_chg() Nov 26, 2025
@edelarua edelarua marked this pull request as ready for review November 26, 2025 02:19
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Nov 26, 2025

badge

Code Coverage Summary

Filename                               Stmts    Miss  Cover    Missing
-----------------------------------  -------  ------  -------  ---------
R/add_blank_rows.R                        63       0  100.00%
R/add_hierarchical_count_row.R            33       0  100.00%
R/crane-package.R                          2       2  0.00%    17-18
R/deprecated.R                             6       6  0.00%    15-21
R/label_roche.R                           72       0  100.00%
R/modify_header_rm_md.R                   18       2  88.89%   35-36
R/modify_zero_recode.R                    13       0  100.00%
R/tbl_baseline_chg.R                     186       0  100.00%
R/tbl_hierarchical_rate_and_count.R      148       0  100.00%
R/tbl_hierarchical_rate_by_grade.R       271       3  98.89%   162-164
R/tbl_listing.R                           35       0  100.00%
R/tbl_null_report.R                        9       0  100.00%
R/tbl_roche_summary.R                     64       0  100.00%
R/tbl_shift.R                            116       0  100.00%
R/tbl_survfit_quantiles.R                132       1  99.24%   295
R/tbl_survfit_times.R                     92       0  100.00%
R/theme_gtsummary_roche.R                 74       0  100.00%
R/utils.R                                 36       0  100.00%
TOTAL                                   1370      14  98.98%

Diff against main

Filename                 Stmts    Miss  Cover
---------------------  -------  ------  --------
R/tbl_baseline_chg.R        +2       0  +100.00%
R/tbl_roche_summary.R       +4       0  +100.00%
R/tbl_shift.R               +1       0  +100.00%
R/utils.R                  +31       0  +100.00%
TOTAL                      +38       0  +0.03%

Results for commit: ddd1735

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

@edelarua edelarua requested a review from khatril November 26, 2025 03:04
@edelarua
Copy link
Copy Markdown
Contributor Author

@khatril this PR should set default digit formatting (including NEs) as discussed in the chat.

@edelarua edelarua changed the title Set default digits for tbl_roche_summary() and tbl_baseline_chg() Set default digits for tbl_roche_summary() Nov 26, 2025
Comment thread DESCRIPTION Outdated
Copy link
Copy Markdown
Contributor

@shajoezhu shajoezhu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm! thanks @edelarua

@shajoezhu shajoezhu merged commit f788509 into main Nov 28, 2025
34 checks passed
@shajoezhu shajoezhu deleted the 138-tbl_roche_summary_digits branch November 28, 2025 05:21
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 28, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Set default digits formats for tbl_roche_summary()

2 participants