From 78aabe18aae5488c01d0d7a83e474ae0b2dd843a Mon Sep 17 00:00:00 2001 From: munoztd0 Date: Wed, 4 Mar 2026 11:48:04 +0100 Subject: [PATCH] change all defaults for debugging purposes --- R/count_values.R | 2 +- R/estimate_multinomial_rsp.R | 2 +- R/incidence_rate.R | 2 +- R/logistic_regression.R | 8 +- R/summarize_change.R | 10 +- R/summarize_coxreg.R | 2 +- R/survival_timepoint.R | 2 +- R/utils_default_stats_formats_labels.R | 140 ++++++++++++------------- 8 files changed, 84 insertions(+), 84 deletions(-) diff --git a/R/count_values.R b/R/count_values.R index de84aed3c0..2ca86047f4 100644 --- a/R/count_values.R +++ b/R/count_values.R @@ -185,7 +185,7 @@ count_values <- function(lyt, table_names = vars, .stats = "count_fraction", .stat_names = NULL, - .formats = c(count_fraction = "xx (xx.xx%)", count = "xx"), + .formats = c(count_fraction = "xx (xx.x%)", count = "xx"), .labels = c(count_fraction = paste(values, collapse = ", ")), .indent_mods = NULL) { # Process standard extra arguments diff --git a/R/estimate_multinomial_rsp.R b/R/estimate_multinomial_rsp.R index cd1ab24bba..27312f2d22 100644 --- a/R/estimate_multinomial_rsp.R +++ b/R/estimate_multinomial_rsp.R @@ -204,7 +204,7 @@ estimate_multinomial_response <- function(lyt, table_names = var, .stats = "prop_ci", .stat_names = NULL, - .formats = list(prop_ci = "(xx.xx, xx.xx)"), + .formats = list(prop_ci = "(xx.x, xx.x)"), .labels = NULL, .indent_mods = NULL) { # Process standard extra arguments diff --git a/R/incidence_rate.R b/R/incidence_rate.R index 6b3269fd76..33c5d25cdc 100644 --- a/R/incidence_rate.R +++ b/R/incidence_rate.R @@ -234,7 +234,7 @@ estimate_incidence_rate <- function(lyt, table_names = vars, .stats = c("person_years", "n_events", "rate", "rate_ci"), .stat_names = NULL, - .formats = list(rate = "xx.xx", rate_ci = "(xx.xx, xx.xx)"), + .formats = list(rate = "xx.x", rate_ci = "(xx.x, xx.x)"), .labels = NULL, .indent_mods = NULL) { # Process standard extra arguments diff --git a/R/logistic_regression.R b/R/logistic_regression.R index 4a77d00c62..ddff49c3ff 100644 --- a/R/logistic_regression.R +++ b/R/logistic_regression.R @@ -339,12 +339,12 @@ logistic_summary_by_flag <- function(flag_var, na_str = default_na_str(), .inden checkmate::assert_string(flag_var) function(lyt) { cfun_list <- list( - df = cfun_by_flag("df", flag_var, format = "xx.", .indent_mods = .indent_mods), - estimate = cfun_by_flag("estimate", flag_var, format = "xx.xxx", .indent_mods = .indent_mods), - std_error = cfun_by_flag("std_error", flag_var, format = "xx.xxx", .indent_mods = .indent_mods), + df = cfun_by_flag("df", flag_var, format = "xx.x", .indent_mods = .indent_mods), + estimate = cfun_by_flag("estimate", flag_var, format = "xx.xx", .indent_mods = .indent_mods), + std_error = cfun_by_flag("std_error", flag_var, format = "xx.xx", .indent_mods = .indent_mods), odds_ratio = cfun_by_flag("odds_ratio", flag_var, format = ">999.99", .indent_mods = .indent_mods), ci = cfun_by_flag("ci", flag_var, format = format_extreme_values_ci(2L), .indent_mods = .indent_mods), - pvalue = cfun_by_flag("pvalue", flag_var, format = "x.xxxx | (<0.0001)", .indent_mods = .indent_mods) + pvalue = cfun_by_flag("pvalue", flag_var, format = "x.xxx | (<0.0001)", .indent_mods = .indent_mods) ) summarize_row_groups( lyt = lyt, diff --git a/R/summarize_change.R b/R/summarize_change.R index bc3ebb89ff..795724df95 100644 --- a/R/summarize_change.R +++ b/R/summarize_change.R @@ -162,11 +162,11 @@ summarize_change <- function(lyt, .stats = c("n", "mean_sd", "median", "range"), .stat_names = NULL, .formats = c( - mean_sd = "xx.xx (xx.xx)", - mean_se = "xx.xx (xx.xx)", - median = "xx.xx", - range = "xx.xx - xx.xx", - mean_pval = "xx.xx" + mean_sd = "xx.x (xx.x)", + mean_se = "xx.x (xx.x)", + median = "xx.x", + range = "xx.x - xx.x", + mean_pval = "xx.x" ), .labels = NULL, .indent_mods = NULL) { diff --git a/R/summarize_coxreg.R b/R/summarize_coxreg.R index ecdd9f2295..ae3b3943de 100644 --- a/R/summarize_coxreg.R +++ b/R/summarize_coxreg.R @@ -329,7 +329,7 @@ summarize_coxreg <- function(lyt, common_var = "STUDYID", .stats = c("n", "hr", "ci", "pval", "pval_inter"), .formats = c( - n = "xx", hr = "xx.xx", ci = "(xx.xx, xx.xx)", + n = "xx", hr = "xx.x", ci = "(xx.xx, xx.xx)", pval = "x.xxxx | (<0.0001)", pval_inter = "x.xxxx | (<0.0001)" ), varlabels = NULL, diff --git a/R/survival_timepoint.R b/R/survival_timepoint.R index 4adb04e8f8..af01733b0c 100644 --- a/R/survival_timepoint.R +++ b/R/survival_timepoint.R @@ -305,7 +305,7 @@ surv_timepoint <- function(lyt, "rate_diff", "rate_diff_ci", "ztest_pval" ), .stat_names = NULL, - .formats = list(rate_ci = "(xx.xx, xx.xx)"), + .formats = list(rate_ci = "(xx.x, xx.x)"), .labels = NULL, .indent_mods = if (method == "both") { c(rate_diff = 1L, rate_diff_ci = 2L, ztest_pval = 2L) diff --git a/R/utils_default_stats_formats_labels.R b/R/utils_default_stats_formats_labels.R index 87da529733..986d893c11 100644 --- a/R/utils_default_stats_formats_labels.R +++ b/R/utils_default_stats_formats_labels.R @@ -608,82 +608,82 @@ tern_default_stats <- list( #' @export tern_default_formats <- c( ci = list(format_extreme_values_ci(2L)), - count = "xx.", + count = "xx.x", count_fraction = format_count_fraction, count_fraction_fixed_dp = format_count_fraction_fixed_dp, - cv = "xx.x", - event_free_rate = "xx.xx", + cv = "xx.xx", + event_free_rate = "xx.xxx", fraction = format_fraction_fixed_dp, - geom_cv = "xx.x", - geom_mean = "xx.x", - geom_mean_ci = "(xx.xx, xx.xx)", - geom_mean_ci_3d = "xx.xx (xx.xx - xx.xx)", - geom_mean_sd = "xx.x (xx.x)", - geom_sd = "xx.x", + geom_cv = "xx.xx", + geom_mean = "xx.xx", + geom_mean_ci = "(xx.x, xx.x)", + geom_mean_ci_3d = "xx.x (xx.x - xx.x)", + geom_mean_sd = "xx.xx (xx.xx)", + geom_sd = "xx.xx", hr = list(format_extreme_values(2L)), - hr_ci = "(xx.xx, xx.xx)", - hr_ci_3d = "xx.xx (xx.xx - xx.xx)", - iqr = "xx.x", - lsmean = "xx.xx", - lsmean_diff = "xx.xx", - lsmean_diff_ci = "(xx.xx, xx.xx)", - mad = "xx.x", - max = "xx.x", - mean = "xx.x", - mean_ci = "(xx.xx, xx.xx)", - mean_ci_3d = "xx.xx (xx.xx - xx.xx)", - mean_pval = "x.xxxx | (<0.0001)", - mean_sd = "xx.x (xx.x)", - mean_sdi = "(xx.xx, xx.xx)", - mean_se = "xx.x (xx.x)", - mean_sei = "(xx.xx, xx.xx)", - median = "xx.x", - median_ci = "(xx.xx, xx.xx)", - median_ci_3d = "xx.xx (xx.xx - xx.xx)", - median_range = "xx.x (xx.x - xx.x)", - min = "xx.x", - n = "xx.", - n_blq = "xx.", - n_events = "xx", - n_patients = "xx (xx.x%)", - n_prop = "xx (xx.x%)", - n_rate = "xx (xx.x)", - n_rsp = "xx", - n_tot = "xx", - n_tot_events = "xx", - n_unique = "xx", - nonunique = "xx", + hr_ci = "(xx.x, xx.x)", + hr_ci_3d = "xx.x (xx.x - xx.x)", + iqr = "xx.xx", + lsmean = "xx.x", + lsmean_diff = "xx.x", + lsmean_diff_ci = "(xx.x, xx.x)", + mad = "xx.xx", + max = "xx.xx", + mean = "xx.xx", + mean_ci = "(xx.x, xx.x)", + mean_ci_3d = "xx.x (xx.x - xx.x)", + mean_pval = "x.xxx | (<0.0001)", + mean_sd = "xx.xx (xx.xx)", + mean_sdi = "(xx.x, xx.x)", + mean_se = "xx.xx (xx.xx)", + mean_sei = "(xx.x, xx.x)", + median = "xx.xx", + median_ci = "(xx.x, xx.x)", + median_ci_3d = "xx.x (xx.x - xx.x)", + median_range = "xx.xx (xx.xx - xx.xx)", + min = "xx.xx", + n = "xx.x", + n_blq = "xx.x", + n_events = "xx.x", + n_patients = "xx.x (xx.xx%)", + n_prop = "xx (xx.xx%)", + n_rate = "xx (xx.xx)", + n_rsp = "xx.x", + n_tot = "xx.x", + n_tot_events = "xx.x", + n_unique = "xx.x", + nonunique = "xx.x", or = list(format_extreme_values(2L)), - or_ci = "xx.xx (xx.xx - xx.xx)", - person_years = "xx.x", - prop = "xx.x%", - prop_ci = "(xx.x, xx.x)", - pt_at_risk = "xx", - pval = "x.xxxx | (<0.0001)", - pvalue = "x.xxxx | (<0.0001)", - pval_counts = "x.xxxx | (<0.0001)", - quantiles = "xx.x - xx.x", - quantiles_lower = "xx.xx (xx.xx - xx.xx)", - quantiles_upper = "xx.xx (xx.xx - xx.xx)", - range = "xx.x - xx.x", - range_censor = "xx.x to xx.x", - range_event = "xx.x to xx.x", - rate = "xx.xxxx", - rate_ci = "(xx.xxxx, xx.xxxx)", - rate_diff = "xx.xx", - rate_diff_ci = "(xx.xx, xx.xx)", - rate_diff_ci_3d = format_xx("xx.xx (xx.xx, xx.xx)"), - rate_ratio = "xx.xxxx", - rate_ratio_ci = "(xx.xxxx, xx.xxxx)", - rate_se = "xx.xx", - riskdiff = "xx.x (xx.x - xx.x)", - sd = "xx.x", - se = "xx.x", - sum = "xx.x", - sum_exposure = "xx", + or_ci = "xx.x (xx.x - xx.x)", + person_years = "xx.xx", + prop = "xx.xx%", + prop_ci = "(xx.xx, xx.xx)", + pt_at_risk = "xx.x", + pval = "x.xxx | (<0.0001)", + pvalue = "x.xxx | (<0.0001)", + pval_counts = "x.xxx | (<0.0001)", + quantiles = "xx.xx - xx.xx", + quantiles_lower = "xx.x (xx.x - xx.x)", + quantiles_upper = "xx.x (xx.x - xx.x)", + range = "xx.xx - xx.xx", + range_censor = "xx.xx to xx.xx", + range_event = "xx.xx to xx.xx", + rate = "xx.xxx", + rate_ci = "(xx.xxx, xx.xxx)", + rate_diff = "xx.x", + rate_diff_ci = "(xx.x, xx.x)", + rate_diff_ci_3d = format_xx("xx.x (xx.x, xx.x)"), + rate_ratio = "xx.xxx", + rate_ratio_ci = "(xx.xxx, xx.xxx)", + rate_se = "xx.x", + riskdiff = "xx.xx (xx.xx - xx.xx)", + sd = "xx.xx", + se = "xx.xx", + sum = "xx.xx", + sum_exposure = "xx.x", unique = format_count_fraction_fixed_dp, - unique_count = "xx", - ztest_pval = "x.xxxx | (<0.0001)" + unique_count = "xx.x", + ztest_pval = "x.xxx | (<0.0001)" ) # tern_default_labels ----------------------------------------------------------