Use tbl_listing() for the individual subject deaths listing - #357
Open
Melkiades wants to merge 6 commits into
Open
Use tbl_listing() for the individual subject deaths listing#357Melkiades wants to merge 6 commits into
Melkiades wants to merge 6 commits into
Conversation
FDA Table 9 is a subject-level listing, not an aggregated summary. It was built with gtsummary::as_gtsummary(), which returns a generic table. crane::tbl_listing() is the purpose-built constructor for listings and returns an object classed as such, while remaining a gtsummary so the existing modify_header()/modify_column_alignment() calls are unchanged. The snapshot captures the underlying data frame, which is untouched, so output is identical. - test-fda-table_09: build tbl with crane::tbl_listing() - catalog index.qmd: same swap for the published template
Per the FDA IG, Table 9 is a subject-level listing. Note the other IG listings (39, 41, 42, 54, 55) that are not yet in the catalog.
Melkiades
marked this pull request as ready for review
September 1, 2026 08:41
Contributor
Unit Tests Summary 1 files 28 suites 21s ⏱️ Results for commit fa0a2d4. ♻️ This comment has been updated with latest results. |
Contributor
Code Coverage SummaryDiff against mainResults for commit: fa0a2d4 Minimum allowed coverage is ♻️ This comment has been updated with latest results |
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.
GitHub Issue
Closes #354
Summary
FDA Table 9 (all individual subject deaths) is a subject-level listing, not an aggregated summary. It was built with
gtsummary::as_gtsummary(), which returns a generic table.crane::tbl_listing()is the purpose-built constructor for listings and classes the object as such, while remaining agtsummaryso the existingmodify_header()/modify_column_alignment()calls are unchanged.test-fda-table_09: buildtblwithcrane::tbl_listing()index.qmd: same swap for the published templateWhy only Table 9?
It is fair to ask whether more templates should use
tbl_listing(). I checked every template against the FDA Standard Safety Tables and Figures Integrated Guide (2025), which is the source for our catalog.The guide defines 60 numbered "Table" items, but 6 of them are actually subject-level listings (titled "Listing of ..." or "All Individual Subject ..."): Tables 9, 39, 41, 42, 54 and 55. The rest are aggregated summaries (n/%, mean/SD, risk difference, etc.).
Of those 6 listings, only Table 9 exists in our catalog today. Tables 39, 41, 42, 54 and 55 are not implemented yet, so there is nothing to convert. Every other implemented template (02, 03, 04, 06, 07, 08, 10-18, 29, 33-38, 43-45, 50, 51) is a summary built on
tbl_summary/tbl_hierarchical/tbl_ard_summary, sotbl_listing()does not apply.So Table 9 is the only listing to switch right now. When Tables 39/41/42/54/55 are added, they should use
tbl_listing()too.Snapshot unchanged
The snapshot captures the underlying data frame (
as.data.frame(data)), which is untouched, so output is identical. Test passes locally.