From 14b71af8b5c4463147dcac3ba720adf7e12d0b73 Mon Sep 17 00:00:00 2001 From: Emily de la Rua <59304861+edelarua@users.noreply.github.com> Date: Tue, 27 Feb 2024 06:55:52 -0500 Subject: [PATCH] Allow `NULL` `paramcd` value in `tm_t_summary_by` (#1083) # Pull Request Fixes #1082 Required version of `teal.data` should be updated after merging https://github.com/insightsengineering/teal.data/pull/301. Co-authored-by: Pawel Rucki <12943682+pawelru@users.noreply.github.com> --- NEWS.md | 3 +++ R/tm_t_summary_by.R | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 93004a7cb6..aa89e91b18 100644 --- a/NEWS.md +++ b/NEWS.md @@ -3,6 +3,9 @@ ### Enhancements * Updated `tm_g_forest_rsp` and `tm_g_forest_tte` to use refactored version of `g_forest`. Plots are now displayed as `ggplot` objects instead of `grob` objects. Added parameters `font_size` and `rel_width_forest` to control font size and width of plot relative to table, respectively. +### Enhancements +* Updated `tm_t_summary_by` to allow `NULL` input to `paramcd` argument. + ### Miscellaneous * Removed `formatters` from dependencies and replaced the use of its functions relating to variable labels with functions from `teal.data`. diff --git a/R/tm_t_summary_by.R b/R/tm_t_summary_by.R index 8cfd2ea128..97caee2ff2 100644 --- a/R/tm_t_summary_by.R +++ b/R/tm_t_summary_by.R @@ -402,7 +402,7 @@ tm_t_summary_by <- function(label, checkmate::assert_class(by_vars, "choices_selected") checkmate::assert_class(summarize_vars, "choices_selected") checkmate::assert_class(id_var, "choices_selected") - checkmate::assert_class(paramcd, "choices_selected") + checkmate::assert_class(paramcd, "choices_selected", null.ok = TRUE) checkmate::assert_class(denominator, "choices_selected") checkmate::assert_flag(add_total) checkmate::assert_string(total_label)