Skip to content

7 Add example specifying column widths#22

Merged
BFalquet merged 4 commits intomainfrom
7-add-example-specifying-column-widths@main
Feb 3, 2026
Merged

7 Add example specifying column widths#22
BFalquet merged 4 commits intomainfrom
7-add-example-specifying-column-widths@main

Conversation

@BFalquet
Copy link
Contributor

@BFalquet BFalquet commented Feb 2, 2026

save_with_rmarkdown , improving reliability when working with different table types (especially gt_tbl). It introduces a new helper function to distinguish between generic lists and special table objects, and updates documentation and tests to cover new usage patterns.

Refactoring and Logic Improvements:

  • Added the is_simple_list() helper function to reliably distinguish between generic lists and special table objects like gt_tbl, replacing previous direct inherits(x, "list") checks throughout the codebase. (R/save_with_rmarkdown.R, R/create_yaml_header.R) [1] [2] [3] [4] [5]
  • Updated conditional logic in save_with_rmarkdown() and create_yaml_header() to use is_simple_list() for more accurate handling of input objects, ensuring correct processing of lists and single table objects. (R/save_with_rmarkdown.R, R/create_yaml_header.R) [1] [2] [3] [4]

Documentation Enhancements:

  • Expanded examples in documentation to show manual column width specification for both flextable and gt tables, reflecting new usage patterns enabled by the refactor. (R/save_with_rmarkdown.R, man/save_with_rmarkdown.Rd) [1] [2]

Testing Improvements:

  • Added a new test to ensure save_with_rmarkdown() works correctly with lists of gt_tbl objects, verifying that output files are created as expected. (tests/testthat/test-save_with_rmarkdown.R)

@BFalquet BFalquet requested a review from Melkiades February 2, 2026 17:17
Copy link
Contributor

@Melkiades Melkiades left a comment

Choose a reason for hiding this comment

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

Remember NEWS file and it is good to go for me! Great thing. I would keep it as an optional customization (to add to the customization stack in the catalog

@BFalquet BFalquet merged commit e78eb79 into main Feb 3, 2026
9 checks passed
@BFalquet BFalquet deleted the 7-add-example-specifying-column-widths@main branch February 3, 2026 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants