Skip to content

Conversation

@edelarua
Copy link
Collaborator

@edelarua edelarua commented Oct 17, 2025

What changes are proposed in this pull request?

Also:

  • Updated default statistic formats for tbl_survfit_times() to align with catalog standard.
  • Implemented skip_if_pkg_not_installed() in tests.

Closes #131


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".

@edelarua edelarua added the sme label Oct 17, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Oct 17, 2025

Unit Tests Summary

  1 files   69 suites   1m 32s ⏱️
 69 tests  69 ✅ 0 💤 0 ❌
174 runs  174 ✅ 0 💤 0 ❌

Results for commit a614153.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 17, 2025

Unit Test Performance Difference

Test Suite $Status$ Time on main $±Time$ $±Tests$ $±Skipped$ $±Failures$ $±Errors$
add_difference_row 👶 $+0.00$ $+2$ $0$ $0$ $0$
Additional test case details
Test Suite $Status$ Time on main $±Time$ Test Case
add_blank_rows 💔 $1.18$ $+5.39$ add_blank_rows_works
add_difference_row 👶 $+0.00$ add_difference_row.tbl_survfit_times_error_messaging_works
add_difference_row 👶 $+3.66$ add_difference_row.tbl_survfit_times_works
add_hierarchical_count_row 💚 $5.00$ $-4.53$ add_hierarchical_count_row_works
tbl_shift 💔 $20.20$ $+1.20$ tbl_shift_strata_location_

Results for commit c87b773

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 17, 2025

badge

Code Coverage Summary

Filename                               Stmts    Miss  Cover    Missing
-----------------------------------  -------  ------  -------  ---------
R/add_blank_rows.R                        63       0  100.00%
R/add_difference_row.R                   101       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                     184       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                     60       0  100.00%
R/tbl_shift.R                            115       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                                  5       0  100.00%
TOTAL                                   1433      14  99.02%

Diff against main

Filename                  Stmts    Miss  Cover
----------------------  -------  ------  --------
R/add_difference_row.R     +101       0  +100.00%
TOTAL                      +101       0  +0.07%

Results for commit: a614153

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

dplyr::mutate(
# add default labels
label = dplyr::case_when(
.data$label == "Survival Difference" ~ "Difference in Event Free Rates",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Should this be "Difference in Event Free Rate"? The GDSR has it with "Rates" but TLG catalog and STREAM with "Rate".

Copy link
Collaborator

@ddsjoberg ddsjoberg left a comment

Choose a reason for hiding this comment

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

Thank you for putting this together!

I think we'll need to write it a bit more generally because while the survival differences are important to report, we'll also need to report items like hazards ratios, right? Let's meet to discuss our reporting needs.

@edelarua edelarua requested a review from ddsjoberg October 29, 2025 01:32
@ddsjoberg
Copy link
Collaborator

This is great, thank you. At the moment this is hyper focussed to create the table from the spec. I wonder if there would be value in adding a test argument like the original add_difference_row() function so the users can change the difference statistics to, for example, hazard ratios. But this change would then require the catalog to add a call to modify_indent() to indent the last two rows further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add function to add difference statistics to tbl_survfit_times() tables

3 participants