Changelog
Source:NEWS.md
tfrmt 0.4.0
Improvements
-
footnote_plan()receives a new argument,order, allowing users to specify the order of footnotes (#605, @alanahjonas95). - Add markdown processing of stub column labels (#617)
- Update default for
row_grp_plan()/row_grp_structure()to remove trailing post-space rows (#630, @alanahjonas95). - Added
extract_data()function to enable data to be easily extracted from a tfrmt into a data frame (#628, @alanahjonas95). -
shuffle_card()now automatically strips inherited ARD attributes from objects of classbind_ardto avoid unreliable metadata (#650). -
shuffle_card()now prioritises the user-suppliedbyargument over inherited ARD attributes, giving users control to override attributes and updating the mismatch message to reflect this change (#650).
Bug fixes
- Fix bug in
tfrmt_sigdigso it correctly passes the ‘missing’ argument to the body_plan (#621, @alanahjonas95). - Fix bug in
page_planwhere the max_rows argument was returning an error if a value in the group variable was an empty string (#539, @alanahjonas95). - Fix bug in
row_grp_planwhere identical labels repeated across different groups were incorrectly forced to the top of the table instead of maintaining their correct order (#634, @alanahjonas95). - Fix bug in
as.character.span_structurewhere the regex was incorrectly capturing content wrapped in parentheses as an R function even though it did not have a valid R function identifier immediately before the(. i.e., “n (%)” incorrectly captured as a function (#643, @LiamHobby).
tfrmt 0.3.0
CRAN release: 2026-01-24
Improvements
-
page_plan()receives a new argument,transform, allowing users to modify the page label (#496, @dragosmg). - Replace duplicate spaces in the centre of the cell body of an output gt with unicode whitespace to ensure formatting is retained when going to pdf. Leading and trailing whitespace will be non-breaking unicode whitespace
- Default to center alignment of table body values to match alignment of column headers
tfrmt 0.2.1
CRAN release: 2025-10-04
Patch release for latest {gt} release and upcoming {purrr} and {stringr} releases:
- Ensure
rowname_col = NULLingt()withinprint_to_gt()if no row label exists. - Use of
seq_along(x)in lieu of1:length(x)prior tostr_replace()as it no longer accepts NA patterns. - Ensure values are character before processing via
map_chr()as it no longer coerces to character.
tfrmt 0.2.0
CRAN release: 2025-09-06
Improvements
- Working with ARDs created from the {cards} package:
- Added
shuffle_card(), which prepares acardARD object for analysis. - Added
prep_...()functions to reduce the manual processing required for acardARD object once it has been shuffled. (#509, @dragosmg)-
prep_combine_vars(): useful for combining sparsely populated columns into a single one. -
prep_big_n(): useful when the tfrmt contains a bigN structure. It recodes the"n"stat_nameinto"bigN"for the desired variables. -
prep_label(): combinesstat_labelandvariable_levelfor categorical (or categorical-like) variables. -
prep_hierarchical_fill(): does a pair-wise replacement of missing values (NAs) in one column based on another column. It can replaceNAeither with a predetermined value, with the value of the other column in the pair, or with a {glue} expression.
-
- Added
- Updated RTF footnotes so they go in the document footer by default.
Bug fixes
- Fix issue where
*_structurefunctions did not correctly parse strings containing quotes in some cases. (#466) - Fix issue where page_plan doesn’t work if there is only one level in your paging variable. (#506)
- Fix issues where an error is thrown instead of a message if: (1) levels of page-specific big Ns do not align with levels of pagination (#505) or (2) the pagination levels are sorted non-alphabetically. (#516)
- Fix issue where the big_n_structure doesn’t work when the column name used for page_plan/grouping has a space in it. (#522)
tfrmt 0.1.3
CRAN release: 2024-10-15
Bug fixes
- Fixed issue where JSON conversion of
frmt_whendropped quotes from strings - Avoid use of deprecated functionality in
dplyr::summarise()
tfrmt 0.1.1
CRAN release: 2024-03-15
Bug fixes
- Fixed issue where
frmt_combinecouldn’t process variable names surrounded by backticks - Fixed issue where
row_grp_planpost space did not respectcol_style_planwidths by adding newfillargument toelement_block. Thefillargument controls whether post space values should be recycled for the cell’s data width. For example, a cell width of 3 will be respected by the post space with the following syntax:element_block(post_space = "---", fill = FALSE). - Remove unused
borderargument inelement_block. - Fixed bug where
row_grp_plansplits on all grouping variables, even if not mentioned. Instead, the logic has been updated to split on those explicitly mentioned, similar topage_plan - Fixed issue where padding and alignment is lost for non-HTML outputs via the
.unicode_wsargument added toprint_to_gt()andprint_mock_gt(). This defaults toTRUEbut should be set toFALSEfor RTF outputs (until {gt} bug is resolved). - Fixed issue where
make_mock_datacould result in duplicate rows
tfrmt 0.1.0
CRAN release: 2023-10-17
New features:
- Improved column alignment capabilities (via
col_style_plan). Alignment options now fall into two types: character (type = “char”) and positional (type = “pos”). Positional alignment is new and allows for aligning across multiple positions. - Add
page_planfor splitting tables across multiple pages - Add ability to add a group/label header via the
col_plan
tfrmt 0.0.3
CRAN release: 2023-06-22
- Fixed bugs with JSON read/write
- Added transformation capabilities to
frmt()