From b36b87b2764ca8d2b2cef20b3db520f45cd1bafc Mon Sep 17 00:00:00 2001 From: dtord Date: Thu, 5 Mar 2026 09:22:11 +0000 Subject: [PATCH 1/4] update: remove tern default n = jjcsformat_xx("xx") --- tests/testthat/source_code/tpk01a.R | 1 + tests/testthat/source_code/tpk02.R | 1 + tests/testthat/source_code/tsidem01.R | 12 +++++++++--- tests/testthat/source_code/tsids01.R | 5 +++-- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/tests/testthat/source_code/tpk01a.R b/tests/testthat/source_code/tpk01a.R index 144f4178..799353ab 100644 --- a/tests/testthat/source_code/tpk01a.R +++ b/tests/testthat/source_code/tpk01a.R @@ -134,6 +134,7 @@ lyt <- basic_table() |> quantiles = "Interquartile range" ), .formats = c( + n = jjcsformat_xx("xx"), mean_sd = jjcsformat_xx("xx.xx (xx.xx)"), median = jjcsformat_xx("xx.xx"), geom_mean = jjcsformat_xx("xx.xx"), diff --git a/tests/testthat/source_code/tpk02.R b/tests/testthat/source_code/tpk02.R index 91d3bb39..43651a04 100644 --- a/tests/testthat/source_code/tpk02.R +++ b/tests/testthat/source_code/tpk02.R @@ -137,6 +137,7 @@ for (i in seq_along(trt_grps)) { quantiles = "Interquartile range" ), .formats = c( + n = jjcsformat_xx("xx"), mean_sd = jjcsformat_xx("xx.xx (xx.xx)"), median = jjcsformat_xx("xx.xx"), geom_mean = jjcsformat_xx("xx.xx"), diff --git a/tests/testthat/source_code/tsidem01.R b/tests/testthat/source_code/tsidem01.R index 66c99753..bb9ce26b 100644 --- a/tests/testthat/source_code/tsidem01.R +++ b/tests/testthat/source_code/tsidem01.R @@ -231,7 +231,9 @@ lyt <- basic_table( extra_args = list( .stats = c("n", "mean_sd", "median", "range", "count_fraction"), .labels = c("n" = "N", "range" = "Min, max"), - .formats = c(P1_precision, "count_fraction" = jjcsformat_count_fraction), + .formats = c(P1_precision, + n = jjcsformat_xx("xx"), + "count_fraction" = jjcsformat_count_fraction), .indent_mods = c( "n" = 0L, "mean_sd" = 1L, @@ -262,7 +264,9 @@ lyt <- basic_table( extra_args = list( .stats = c("n", "mean_sd", "median", "range", "count_fraction"), .labels = c("n" = "N", "range" = "Min, max"), - .formats = c(P2a_precision, "count_fraction" = jjcsformat_count_fraction), + .formats = c(P2a_precision, + n = jjcsformat_xx("xx"), + "count_fraction" = jjcsformat_count_fraction), .indent_mods = c( "n" = 0L, "mean_sd" = 1L, @@ -280,7 +284,9 @@ lyt <- basic_table( extra_args = list( .stats = c("n", "mean_sd", "median", "range", "count_fraction"), .labels = c("n" = "N", "range" = "Min, max"), - .formats = c(P2b_precision, "count_fraction" = jjcsformat_count_fraction), + .formats = c(P2b_precision, + n = jjcsformat_xx("xx"), + "count_fraction" = jjcsformat_count_fraction), .indent_mods = c( "n" = 0L, "mean_sd" = 1L, diff --git a/tests/testthat/source_code/tsids01.R b/tests/testthat/source_code/tsids01.R index d81caf47..36043531 100644 --- a/tests/testthat/source_code/tsids01.R +++ b/tests/testthat/source_code/tsids01.R @@ -24,7 +24,7 @@ ############################################################################### library(envsetup) -library(tern) +#library(tern) library(dplyr) library(rtables) library(junco) @@ -97,7 +97,8 @@ lyt <- basic_table( var = "USUBJID", flag_variables = c("RESCRNFL"), nested = FALSE, - .stats = "count" + .stats = "count", + .formats = c("count_fraction" = jjcsformat_count_fraction) ) %>% count_patients_with_flags( var = "USUBJID", From c605e9299655724057d5a4ffb9a0c63995fca9ee Mon Sep 17 00:00:00 2001 From: dtord Date: Thu, 5 Mar 2026 09:33:13 +0000 Subject: [PATCH 2/4] jjcsformat_xx("xx") --- tests/testthat/source_code/tsids01.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/testthat/source_code/tsids01.R b/tests/testthat/source_code/tsids01.R index 36043531..8b649cbc 100644 --- a/tests/testthat/source_code/tsids01.R +++ b/tests/testthat/source_code/tsids01.R @@ -98,7 +98,7 @@ lyt <- basic_table( flag_variables = c("RESCRNFL"), nested = FALSE, .stats = "count", - .formats = c("count_fraction" = jjcsformat_count_fraction) + .formats = c("count" = jjcsformat_xx("xx")) ) %>% count_patients_with_flags( var = "USUBJID", From df226539748adb5677871c0cc59b01f6f4e9ea37 Mon Sep 17 00:00:00 2001 From: dtord Date: Thu, 5 Mar 2026 10:20:39 +0000 Subject: [PATCH 3/4] update: to messed up formatters fork --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index b8ee074e..9a970e45 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -50,7 +50,7 @@ Suggests: VignetteBuilder: knitr Remotes: - insightsengineering/formatters@main, + munoztd0/formatters@jnj_templates_scripts_3_formatters_change_width, insightsengineering/rlistings@main, insightsengineering/rtables@main, insightsengineering/tern@main, From a3abea0a18d2ade46ddcc5a9e343602a279a1122 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 5 Mar 2026 10:46:51 +0000 Subject: [PATCH 4/4] [skip style] [skip vbump] Restyle files --- tests/testthat/source_code/tsidem01.R | 15 +++++++++------ tests/testthat/source_code/tsids01.R | 2 +- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/tests/testthat/source_code/tsidem01.R b/tests/testthat/source_code/tsidem01.R index bb9ce26b..b3fd519d 100644 --- a/tests/testthat/source_code/tsidem01.R +++ b/tests/testthat/source_code/tsidem01.R @@ -232,8 +232,9 @@ lyt <- basic_table( .stats = c("n", "mean_sd", "median", "range", "count_fraction"), .labels = c("n" = "N", "range" = "Min, max"), .formats = c(P1_precision, - n = jjcsformat_xx("xx"), - "count_fraction" = jjcsformat_count_fraction), + n = jjcsformat_xx("xx"), + "count_fraction" = jjcsformat_count_fraction + ), .indent_mods = c( "n" = 0L, "mean_sd" = 1L, @@ -265,8 +266,9 @@ lyt <- basic_table( .stats = c("n", "mean_sd", "median", "range", "count_fraction"), .labels = c("n" = "N", "range" = "Min, max"), .formats = c(P2a_precision, - n = jjcsformat_xx("xx"), - "count_fraction" = jjcsformat_count_fraction), + n = jjcsformat_xx("xx"), + "count_fraction" = jjcsformat_count_fraction + ), .indent_mods = c( "n" = 0L, "mean_sd" = 1L, @@ -285,8 +287,9 @@ lyt <- basic_table( .stats = c("n", "mean_sd", "median", "range", "count_fraction"), .labels = c("n" = "N", "range" = "Min, max"), .formats = c(P2b_precision, - n = jjcsformat_xx("xx"), - "count_fraction" = jjcsformat_count_fraction), + n = jjcsformat_xx("xx"), + "count_fraction" = jjcsformat_count_fraction + ), .indent_mods = c( "n" = 0L, "mean_sd" = 1L, diff --git a/tests/testthat/source_code/tsids01.R b/tests/testthat/source_code/tsids01.R index 8b649cbc..0a3f2cb0 100644 --- a/tests/testthat/source_code/tsids01.R +++ b/tests/testthat/source_code/tsids01.R @@ -24,7 +24,7 @@ ############################################################################### library(envsetup) -#library(tern) +# library(tern) library(dplyr) library(rtables) library(junco)