From 9e40eb54545f1ef6f1d4aead724f61cda4ef3dd1 Mon Sep 17 00:00:00 2001 From: Yihui Xie Date: Fri, 6 Sep 2024 13:09:12 -0500 Subject: [PATCH 1/2] follow-up on #461: use "Events" for gs design to be consistent with fixed design --- R/summary.R | 14 ++--- tests/testthat/_snaps/independent_as_gt.md | 52 +++++++++---------- .../independent_as_rtf/gs_design_ahr.rtf | 2 +- .../independent_as_rtf/gs_design_wlr.rtf | 2 +- .../independent_as_rtf/gs_power_wlr.rtf | 6 +-- .../gs_power_wlr_cols_display.rtf | 6 +-- .../gs_power_wlr_efficacy_bound.rtf | 6 +-- .../gs_power_wlr_footnote.rtf | 6 +-- .../gs_power_wlr_futility_bound.rtf | 6 +-- .../gs_power_wlr_spanner.rtf | 6 +-- .../independent_as_rtf/gs_power_wlr_title.rtf | 6 +-- tests/testthat/test-developer-summary.R | 14 ++--- 12 files changed, 63 insertions(+), 63 deletions(-) diff --git a/R/summary.R b/R/summary.R index 4941cb94..4cfdd8a1 100644 --- a/R/summary.R +++ b/R/summary.R @@ -98,9 +98,8 @@ summary.fixed_design <- function(object, ...) { ), fixed = TRUE) ) - # capitalize names with special case of Event -> Events - ans <- replace_names(ans, c(event = "Events")) %>% cap_names() - + # capitalize names + ans <- cap_names(ans) ans <- add_class(ans, "fixed_design", x$design) return(ans) } @@ -405,7 +404,7 @@ get_decimals <- function(vars, decs, vars_default, decs_default) { # capitalize variable names cap_names <- function(x) { low <- c( - "analysis", "design", "power", "time", "event", "n", "bound", "z", + "analysis", "design", "power", "time", "n", "bound", "z", "~risk difference at bound", "~hr at bound", "~whr at bound", "nominal p" ) # map lowercase names to capitalized names @@ -413,9 +412,10 @@ cap_names <- function(x) { map <- gsub("^~risk ", "~Risk ", map) map <- gsub("^(~w?)(hr) ", "\\1HR ", map, perl = TRUE) map <- c( - map, ahr = "AHR", rd = "Risk difference", probability = "Alternate hypothesis", - probability0 = "Null hypothesis", info_frac0 = "Information fraction", - info_frac = "Information fraction", event_frac = "Event fraction" + map, ahr = "AHR", event = "Events", rd = "Risk difference", + probability = "Alternate hypothesis", probability0 = "Null hypothesis", + info_frac0 = "Information fraction", info_frac = "Information fraction", + event_frac = "Event fraction" ) replace_names(x, map) } diff --git a/tests/testthat/_snaps/independent_as_gt.md b/tests/testthat/_snaps/independent_as_gt.md index 7b9ce7be..958c91f9 100644 --- a/tests/testthat/_snaps/independent_as_gt.md +++ b/tests/testthat/_snaps/independent_as_gt.md @@ -73,7 +73,7 @@ \cmidrule(lr){5-6} Bound & Z & Nominal p\textsuperscript{\textit{1}} & \textasciitilde{}HR at bound\textsuperscript{\textit{2}} & Alternate hypothesis & Null hypothesis \\ \midrule\addlinespace[2.5pt] - \multicolumn{6}{l}{Analysis: 1 Time: 36 N: 476 Event: 291.9 AHR: 0.68 Information fraction: 1} \\[2.5pt] + \multicolumn{6}{l}{Analysis: 1 Time: 36 N: 476 Events: 291.9 AHR: 0.68 Information fraction: 1} \\[2.5pt] \midrule\addlinespace[2.5pt] Efficacy & 1.96 & 0.025 & 0.795 & 0.9 & 0.025 \\ \bottomrule @@ -99,17 +99,17 @@ \cmidrule(lr){5-6} Bound & Z & Nominal p\textsuperscript{\textit{1}} & \textasciitilde{}HR at bound\textsuperscript{\textit{2}} & Alternate hypothesis & Null hypothesis \\ \midrule\addlinespace[2.5pt] - \multicolumn{6}{l}{Analysis: 1 Time: 14.9 N: 108 Event: 30 AHR: 0.79 Information fraction: 0.6} \\[2.5pt] + \multicolumn{6}{l}{Analysis: 1 Time: 14.9 N: 108 Events: 30 AHR: 0.79 Information fraction: 0.6} \\[2.5pt] \midrule\addlinespace[2.5pt] Futility & -1.17 & 0.8792 & 1.5392 & 0.0349 & 0.1208 \\ Efficacy & 2.67 & 0.0038 & 0.3743 & 0.0231 & 0.0038 \\ \midrule\addlinespace[2.5pt] - \multicolumn{6}{l}{Analysis: 2 Time: 19.2 N: 108 Event: 40 AHR: 0.74 Information fraction: 0.8} \\[2.5pt] + \multicolumn{6}{l}{Analysis: 2 Time: 19.2 N: 108 Events: 40 AHR: 0.74 Information fraction: 0.8} \\[2.5pt] \midrule\addlinespace[2.5pt] Futility & -0.66 & 0.7462 & 1.2359 & 0.0668 & 0.2655 \\ Efficacy & 2.29 & 0.0110 & 0.4812 & 0.0897 & 0.0122 \\ \midrule\addlinespace[2.5pt] - \multicolumn{6}{l}{Analysis: 3 Time: 24.5 N: 108 Event: 50 AHR: 0.71 Information fraction: 1} \\[2.5pt] + \multicolumn{6}{l}{Analysis: 3 Time: 24.5 N: 108 Events: 50 AHR: 0.71 Information fraction: 1} \\[2.5pt] \midrule\addlinespace[2.5pt] Futility & -0.23 & 0.5897 & 1.0670 & 0.1008 & 0.4303 \\ Efficacy & 2.03 & 0.0211 & 0.5595 & 0.2070 & 0.0250 \\ @@ -136,7 +136,7 @@ \cmidrule(lr){5-6} Bound & Z & Nominal p\textsuperscript{\textit{1}} & \textasciitilde{}wHR at bound\textsuperscript{\textit{2}} & Alternate hypothesis & Null hypothesis \\ \midrule\addlinespace[2.5pt] - \multicolumn{6}{l}{Analysis: 1 Time: 36 N: 471.1 Event: 289 AHR: 0.68 Information fraction: 1\textsuperscript{\textit{3}}} \\[2.5pt] + \multicolumn{6}{l}{Analysis: 1 Time: 36 N: 471.1 Events: 289 AHR: 0.68 Information fraction: 1\textsuperscript{\textit{3}}} \\[2.5pt] \midrule\addlinespace[2.5pt] Efficacy & 1.96 & 0.025 & 0.7941 & 0.9 & 0.025 \\ \bottomrule @@ -163,17 +163,17 @@ \cmidrule(lr){5-6} Bound & Z & Nominal p & \textasciitilde{}wHR at bound\textsuperscript{\textit{3}} & Alternate hypothesis & Null hypothesis \\ \midrule\addlinespace[2.5pt] - \multicolumn{6}{l}{Analysis: 1 Time: 14.9 N: 108 Event: 30 AHR: 0.79 Information fraction: 0.6\textsuperscript{\textit{4}}} \\[2.5pt] + \multicolumn{6}{l}{Analysis: 1 Time: 14.9 N: 108 Events: 30 AHR: 0.79 Information fraction: 0.6\textsuperscript{\textit{4}}} \\[2.5pt] \midrule\addlinespace[2.5pt] Futility & -1.17 & 0.8798 & 1.5353 & 0.0341 & 0.1202 \\ Efficacy & 2.68 & 0.0037 & 0.3765 & 0.0217 & 0.0037 \\ \midrule\addlinespace[2.5pt] - \multicolumn{6}{l}{Analysis: 2 Time: 19.2 N: 108 Event: 40 AHR: 0.75 Information fraction: 0.8\textsuperscript{\textit{4}}} \\[2.5pt] + \multicolumn{6}{l}{Analysis: 2 Time: 19.2 N: 108 Events: 40 AHR: 0.75 Information fraction: 0.8\textsuperscript{\textit{4}}} \\[2.5pt] \midrule\addlinespace[2.5pt] Futility & -0.66 & 0.7452 & 1.2319 & 0.0664 & 0.2664 \\ Efficacy & 2.29 & 0.0110 & 0.4846 & 0.0886 & 0.0121 \\ \midrule\addlinespace[2.5pt] - \multicolumn{6}{l}{Analysis: 3 Time: 24.5 N: 108 Event: 50 AHR: 0.71 Information fraction: 1\textsuperscript{\textit{4}}} \\[2.5pt] + \multicolumn{6}{l}{Analysis: 3 Time: 24.5 N: 108 Events: 50 AHR: 0.71 Information fraction: 1\textsuperscript{\textit{4}}} \\[2.5pt] \midrule\addlinespace[2.5pt] Futility & -0.22 & 0.5881 & 1.0650 & 0.1002 & 0.4319 \\ Efficacy & 2.03 & 0.0212 & 0.5631 & 0.2071 & 0.0250 \\ @@ -202,17 +202,17 @@ \cmidrule(lr){4-5} Bound & Z & Nominal p\textsuperscript{\textit{1}} & Alternate hypothesis & Null hypothesis \\ \midrule\addlinespace[2.5pt] - \multicolumn{5}{l}{Analysis: 1 Time: 12 N: 500 Event: 107.4 AHR: 0.84 Event fraction: 0.32\textsuperscript{\textit{2}}} \\[2.5pt] + \multicolumn{5}{l}{Analysis: 1 Time: 12 N: 500 Events: 107.4 AHR: 0.84 Event fraction: 0.32\textsuperscript{\textit{2}}} \\[2.5pt] \midrule\addlinespace[2.5pt] Futility & -1 & 0.8413 & 0.0293 & 0.0000 \\ Efficacy & 3 & 0.0013 & 0.0175 & 0.0013 \\ \midrule\addlinespace[2.5pt] - \multicolumn{5}{l}{Analysis: 2 Time: 24 N: 500 Event: 246.3 AHR: 0.72 Event fraction: 0.74\textsuperscript{\textit{2}}} \\[2.5pt] + \multicolumn{5}{l}{Analysis: 2 Time: 24 N: 500 Events: 246.3 AHR: 0.72 Event fraction: 0.74\textsuperscript{\textit{2}}} \\[2.5pt] \midrule\addlinespace[2.5pt] Futility & 0 & 0.5000 & 0.0314 & 0.0000 \\ Efficacy & 2 & 0.0228 & 0.7261 & 0.0233 \\ \midrule\addlinespace[2.5pt] - \multicolumn{5}{l}{Analysis: 3 Time: 36 N: 500 Event: 331.3 AHR: 0.68 Event fraction: 1\textsuperscript{\textit{2}}} \\[2.5pt] + \multicolumn{5}{l}{Analysis: 3 Time: 36 N: 500 Events: 331.3 AHR: 0.68 Event fraction: 1\textsuperscript{\textit{2}}} \\[2.5pt] \midrule\addlinespace[2.5pt] Futility & 1 & 0.1587 & 0.0326 & 0.0000 \\ Efficacy & 1 & 0.1587 & 0.9674 & 0.1956 \\ @@ -299,17 +299,17 @@ \cmidrule(lr){5-6} Bound & Z & Nominal p\textsuperscript{\textit{1}} & \textasciitilde{}wHR at bound\textsuperscript{\textit{2}} & Alternate hypothesis & Null hypothesis \\ \midrule\addlinespace[2.5pt] - \multicolumn{6}{l}{Analysis: 1 Time: 14.9 N: 108 Event: 30 AHR: 0.79 Information fraction: 0.6\textsuperscript{\textit{3}}} \\[2.5pt] + \multicolumn{6}{l}{Analysis: 1 Time: 14.9 N: 108 Events: 30 AHR: 0.79 Information fraction: 0.6\textsuperscript{\textit{3}}} \\[2.5pt] \midrule\addlinespace[2.5pt] Futility & -1.17 & 0.8798 & 1.5353 & 0.0341 & 0.1202 \\ Efficacy & 2.68 & 0.0037 & 0.3765 & 0.0217 & 0.0037 \\ \midrule\addlinespace[2.5pt] - \multicolumn{6}{l}{Analysis: 2 Time: 19.2 N: 108 Event: 40 AHR: 0.75 Information fraction: 0.8\textsuperscript{\textit{3}}} \\[2.5pt] + \multicolumn{6}{l}{Analysis: 2 Time: 19.2 N: 108 Events: 40 AHR: 0.75 Information fraction: 0.8\textsuperscript{\textit{3}}} \\[2.5pt] \midrule\addlinespace[2.5pt] Futility & -0.66 & 0.7452 & 1.2319 & 0.0664 & 0.2664 \\ Efficacy & 2.29 & 0.0110 & 0.4846 & 0.0886 & 0.0121 \\ \midrule\addlinespace[2.5pt] - \multicolumn{6}{l}{Analysis: 3 Time: 24.5 N: 108 Event: 50 AHR: 0.71 Information fraction: 1\textsuperscript{\textit{3}}} \\[2.5pt] + \multicolumn{6}{l}{Analysis: 3 Time: 24.5 N: 108 Events: 50 AHR: 0.71 Information fraction: 1\textsuperscript{\textit{3}}} \\[2.5pt] \midrule\addlinespace[2.5pt] Futility & -0.22 & 0.5881 & 1.0650 & 0.1002 & 0.4319 \\ Efficacy & 2.03 & 0.0212 & 0.5631 & 0.2071 & 0.0250 \\ @@ -337,17 +337,17 @@ \cmidrule(lr){5-6} Bound & Z & Nominal p\textsuperscript{\textit{1}} & \textasciitilde{}wHR at bound\textsuperscript{\textit{2}} & under H1 & under H0 \\ \midrule\addlinespace[2.5pt] - \multicolumn{6}{l}{Analysis: 1 Time: 14.9 N: 108 Event: 30 AHR: 0.79 Information fraction: 0.6\textsuperscript{\textit{3}}} \\[2.5pt] + \multicolumn{6}{l}{Analysis: 1 Time: 14.9 N: 108 Events: 30 AHR: 0.79 Information fraction: 0.6\textsuperscript{\textit{3}}} \\[2.5pt] \midrule\addlinespace[2.5pt] Futility & -1.17 & 0.8798 & 1.5353 & 0.0341 & 0.1202 \\ Efficacy & 2.68 & 0.0037 & 0.3765 & 0.0217 & 0.0037 \\ \midrule\addlinespace[2.5pt] - \multicolumn{6}{l}{Analysis: 2 Time: 19.2 N: 108 Event: 40 AHR: 0.75 Information fraction: 0.8\textsuperscript{\textit{3}}} \\[2.5pt] + \multicolumn{6}{l}{Analysis: 2 Time: 19.2 N: 108 Events: 40 AHR: 0.75 Information fraction: 0.8\textsuperscript{\textit{3}}} \\[2.5pt] \midrule\addlinespace[2.5pt] Futility & -0.66 & 0.7452 & 1.2319 & 0.0664 & 0.2664 \\ Efficacy & 2.29 & 0.0110 & 0.4846 & 0.0886 & 0.0121 \\ \midrule\addlinespace[2.5pt] - \multicolumn{6}{l}{Analysis: 3 Time: 24.5 N: 108 Event: 50 AHR: 0.71 Information fraction: 1\textsuperscript{\textit{3}}} \\[2.5pt] + \multicolumn{6}{l}{Analysis: 3 Time: 24.5 N: 108 Events: 50 AHR: 0.71 Information fraction: 1\textsuperscript{\textit{3}}} \\[2.5pt] \midrule\addlinespace[2.5pt] Futility & -0.22 & 0.5881 & 1.0650 & 0.1002 & 0.4319 \\ Efficacy & 2.03 & 0.0212 & 0.5631 & 0.2071 & 0.0250\textsuperscript{\textit{4}} \\ @@ -376,17 +376,17 @@ \cmidrule(lr){5-6} Bound & Z & Nominal p & \textasciitilde{}wHR at bound\textsuperscript{\textit{3}} & Alternate hypothesis & Null hypothesis \\ \midrule\addlinespace[2.5pt] - \multicolumn{6}{l}{Analysis: 1 Time: 14.9 N: 108 Event: 30 AHR: 0.79 Information fraction: 0.6\textsuperscript{\textit{4}}} \\[2.5pt] + \multicolumn{6}{l}{Analysis: 1 Time: 14.9 N: 108 Events: 30 AHR: 0.79 Information fraction: 0.6\textsuperscript{\textit{4}}} \\[2.5pt] \midrule\addlinespace[2.5pt] Futility & -1.17 & 0.8798 & 1.5353 & 0.0341 & 0.1202 \\ Efficacy & 2.68 & 0.0037 & 0.3765 & 0.0217 & 0.0037 \\ \midrule\addlinespace[2.5pt] - \multicolumn{6}{l}{Analysis: 2 Time: 19.2 N: 108 Event: 40 AHR: 0.75 Information fraction: 0.8\textsuperscript{\textit{4}}} \\[2.5pt] + \multicolumn{6}{l}{Analysis: 2 Time: 19.2 N: 108 Events: 40 AHR: 0.75 Information fraction: 0.8\textsuperscript{\textit{4}}} \\[2.5pt] \midrule\addlinespace[2.5pt] Futility & -0.66 & 0.7452 & 1.2319 & 0.0664 & 0.2664 \\ Efficacy & 2.29 & 0.0110 & 0.4846 & 0.0886 & 0.0121 \\ \midrule\addlinespace[2.5pt] - \multicolumn{6}{l}{Analysis: 3 Time: 24.5 N: 108 Event: 50 AHR: 0.71 Information fraction: 1\textsuperscript{\textit{4}}} \\[2.5pt] + \multicolumn{6}{l}{Analysis: 3 Time: 24.5 N: 108 Events: 50 AHR: 0.71 Information fraction: 1\textsuperscript{\textit{4}}} \\[2.5pt] \midrule\addlinespace[2.5pt] Futility & -0.22 & 0.5881 & 1.0650 & 0.1002 & 0.4319 \\ Efficacy & 2.03 & 0.0212 & 0.5631 & 0.2071 & 0.0250 \\ @@ -415,15 +415,15 @@ \cmidrule(lr){5-6} Bound & Z & Nominal p\textsuperscript{\textit{1}} & \textasciitilde{}wHR at bound\textsuperscript{\textit{2}} & Alternate hypothesis & Null hypothesis \\ \midrule\addlinespace[2.5pt] - \multicolumn{6}{l}{Analysis: 1 Time: 14.9 N: 108 Event: 30 AHR: 0.79 Information fraction: 0.6\textsuperscript{\textit{3}}} \\[2.5pt] + \multicolumn{6}{l}{Analysis: 1 Time: 14.9 N: 108 Events: 30 AHR: 0.79 Information fraction: 0.6\textsuperscript{\textit{3}}} \\[2.5pt] \midrule\addlinespace[2.5pt] Efficacy & 2.68 & 0.0037 & 0.3765 & 0.0217 & 0.0037 \\ \midrule\addlinespace[2.5pt] - \multicolumn{6}{l}{Analysis: 2 Time: 19.2 N: 108 Event: 40 AHR: 0.75 Information fraction: 0.8\textsuperscript{\textit{3}}} \\[2.5pt] + \multicolumn{6}{l}{Analysis: 2 Time: 19.2 N: 108 Events: 40 AHR: 0.75 Information fraction: 0.8\textsuperscript{\textit{3}}} \\[2.5pt] \midrule\addlinespace[2.5pt] Efficacy & 2.29 & 0.0110 & 0.4846 & 0.0886 & 0.0121 \\ \midrule\addlinespace[2.5pt] - \multicolumn{6}{l}{Analysis: 3 Time: 24.5 N: 108 Event: 50 AHR: 0.71 Information fraction: 1\textsuperscript{\textit{3}}} \\[2.5pt] + \multicolumn{6}{l}{Analysis: 3 Time: 24.5 N: 108 Events: 50 AHR: 0.71 Information fraction: 1\textsuperscript{\textit{3}}} \\[2.5pt] \midrule\addlinespace[2.5pt] Efficacy & 2.03 & 0.0212 & 0.5631 & 0.2071 & 0.0250 \\ \bottomrule @@ -450,17 +450,17 @@ \cmidrule(lr){4-5} Bound & Nominal p\textsuperscript{\textit{1}} & Z & Alternate hypothesis & Null hypothesis \\ \midrule\addlinespace[2.5pt] - \multicolumn{5}{l}{Analysis: 1 Time: 14.9 N: 108 Event: 30 AHR: 0.79 Information fraction: 0.6\textsuperscript{\textit{2}}} \\[2.5pt] + \multicolumn{5}{l}{Analysis: 1 Time: 14.9 N: 108 Events: 30 AHR: 0.79 Information fraction: 0.6\textsuperscript{\textit{2}}} \\[2.5pt] \midrule\addlinespace[2.5pt] Futility & 0.8798 & -1.17 & 0.0341 & 0.1202 \\ Efficacy & 0.0037 & 2.68 & 0.0217 & 0.0037 \\ \midrule\addlinespace[2.5pt] - \multicolumn{5}{l}{Analysis: 2 Time: 19.2 N: 108 Event: 40 AHR: 0.75 Information fraction: 0.8\textsuperscript{\textit{2}}} \\[2.5pt] + \multicolumn{5}{l}{Analysis: 2 Time: 19.2 N: 108 Events: 40 AHR: 0.75 Information fraction: 0.8\textsuperscript{\textit{2}}} \\[2.5pt] \midrule\addlinespace[2.5pt] Futility & 0.7452 & -0.66 & 0.0664 & 0.2664 \\ Efficacy & 0.0110 & 2.29 & 0.0886 & 0.0121 \\ \midrule\addlinespace[2.5pt] - \multicolumn{5}{l}{Analysis: 3 Time: 24.5 N: 108 Event: 50 AHR: 0.71 Information fraction: 1\textsuperscript{\textit{2}}} \\[2.5pt] + \multicolumn{5}{l}{Analysis: 3 Time: 24.5 N: 108 Events: 50 AHR: 0.71 Information fraction: 1\textsuperscript{\textit{2}}} \\[2.5pt] \midrule\addlinespace[2.5pt] Futility & 0.5881 & -0.22 & 0.1002 & 0.4319 \\ Efficacy & 0.0212 & 2.03 & 0.2071 & 0.0250 \\ diff --git a/tests/testthat/_snaps/independent_as_rtf/gs_design_ahr.rtf b/tests/testthat/_snaps/independent_as_rtf/gs_design_ahr.rtf index a1cc98a9..144bddd7 100644 --- a/tests/testthat/_snaps/independent_as_rtf/gs_design_ahr.rtf +++ b/tests/testthat/_snaps/independent_as_rtf/gs_design_ahr.rtf @@ -42,7 +42,7 @@ \intbl\row\pard \trowd\trgaph108\trleft0\trqc \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx9000 -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Analysis: 1 Time: 36 N: 476 Event: 291.9 AHR: 0.68 Information fraction: 1}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Analysis: 1 Time: 36 N: 476 Events: 291.9 AHR: 0.68 Information fraction: 1}\cell \intbl\row\pard \trowd\trgaph108\trleft0\trqc \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx1500 diff --git a/tests/testthat/_snaps/independent_as_rtf/gs_design_wlr.rtf b/tests/testthat/_snaps/independent_as_rtf/gs_design_wlr.rtf index 06811dd8..c0c76ec9 100644 --- a/tests/testthat/_snaps/independent_as_rtf/gs_design_wlr.rtf +++ b/tests/testthat/_snaps/independent_as_rtf/gs_design_wlr.rtf @@ -42,7 +42,7 @@ \intbl\row\pard \trowd\trgaph108\trleft0\trqc \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx9000 -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Analysis: 1 Time: 36 N: 471.1 Event: 289 AHR: 0.68 Information fraction: 1 {\super c}}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Analysis: 1 Time: 36 N: 471.1 Events: 289 AHR: 0.68 Information fraction: 1 {\super c}}\cell \intbl\row\pard \trowd\trgaph108\trleft0\trqc \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx1500 diff --git a/tests/testthat/_snaps/independent_as_rtf/gs_power_wlr.rtf b/tests/testthat/_snaps/independent_as_rtf/gs_power_wlr.rtf index a72cf174..e2db6d45 100644 --- a/tests/testthat/_snaps/independent_as_rtf/gs_power_wlr.rtf +++ b/tests/testthat/_snaps/independent_as_rtf/gs_power_wlr.rtf @@ -42,7 +42,7 @@ \intbl\row\pard \trowd\trgaph108\trleft0\trqc \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx9000 -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Analysis: 1 Time: 14.9 N: 108 Event: 30 AHR: 0.79 Information fraction: 0.6 {\super c}}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Analysis: 1 Time: 14.9 N: 108 Events: 30 AHR: 0.79 Information fraction: 0.6 {\super c}}\cell \intbl\row\pard \trowd\trgaph108\trleft0\trqc \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx1500 @@ -74,7 +74,7 @@ \intbl\row\pard \trowd\trgaph108\trleft0\trqc \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx9000 -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Analysis: 2 Time: 19.2 N: 108 Event: 40 AHR: 0.75 Information fraction: 0.8 {\super c}}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Analysis: 2 Time: 19.2 N: 108 Events: 40 AHR: 0.75 Information fraction: 0.8 {\super c}}\cell \intbl\row\pard \trowd\trgaph108\trleft0\trqc \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx1500 @@ -106,7 +106,7 @@ \intbl\row\pard \trowd\trgaph108\trleft0\trqc \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx9000 -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Analysis: 3 Time: 24.5 N: 108 Event: 50 AHR: 0.71 Information fraction: 1 {\super c}}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Analysis: 3 Time: 24.5 N: 108 Events: 50 AHR: 0.71 Information fraction: 1 {\super c}}\cell \intbl\row\pard \trowd\trgaph108\trleft0\trqc \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx1500 diff --git a/tests/testthat/_snaps/independent_as_rtf/gs_power_wlr_cols_display.rtf b/tests/testthat/_snaps/independent_as_rtf/gs_power_wlr_cols_display.rtf index 0173e564..f2a7a64b 100644 --- a/tests/testthat/_snaps/independent_as_rtf/gs_power_wlr_cols_display.rtf +++ b/tests/testthat/_snaps/independent_as_rtf/gs_power_wlr_cols_display.rtf @@ -40,7 +40,7 @@ \intbl\row\pard \trowd\trgaph108\trleft0\trqc \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx9000 -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Analysis: 1 Time: 14.9 N: 108 Event: 30 AHR: 0.79 Information fraction: 0.6 {\super b}}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Analysis: 1 Time: 14.9 N: 108 Events: 30 AHR: 0.79 Information fraction: 0.6 {\super b}}\cell \intbl\row\pard \trowd\trgaph108\trleft0\trqc \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx1800 @@ -68,7 +68,7 @@ \intbl\row\pard \trowd\trgaph108\trleft0\trqc \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx9000 -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Analysis: 2 Time: 19.2 N: 108 Event: 40 AHR: 0.75 Information fraction: 0.8 {\super b}}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Analysis: 2 Time: 19.2 N: 108 Events: 40 AHR: 0.75 Information fraction: 0.8 {\super b}}\cell \intbl\row\pard \trowd\trgaph108\trleft0\trqc \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx1800 @@ -96,7 +96,7 @@ \intbl\row\pard \trowd\trgaph108\trleft0\trqc \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx9000 -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Analysis: 3 Time: 24.5 N: 108 Event: 50 AHR: 0.71 Information fraction: 1 {\super b}}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Analysis: 3 Time: 24.5 N: 108 Events: 50 AHR: 0.71 Information fraction: 1 {\super b}}\cell \intbl\row\pard \trowd\trgaph108\trleft0\trqc \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx1800 diff --git a/tests/testthat/_snaps/independent_as_rtf/gs_power_wlr_efficacy_bound.rtf b/tests/testthat/_snaps/independent_as_rtf/gs_power_wlr_efficacy_bound.rtf index 12eaafce..df6858eb 100644 --- a/tests/testthat/_snaps/independent_as_rtf/gs_power_wlr_efficacy_bound.rtf +++ b/tests/testthat/_snaps/independent_as_rtf/gs_power_wlr_efficacy_bound.rtf @@ -42,7 +42,7 @@ \intbl\row\pard \trowd\trgaph108\trleft0\trqc \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx9000 -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Analysis: 1 Time: 14.9 N: 108 Event: 30 AHR: 0.79 Information fraction: 0.6 {\super c}}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Analysis: 1 Time: 14.9 N: 108 Events: 30 AHR: 0.79 Information fraction: 0.6 {\super c}}\cell \intbl\row\pard \trowd\trgaph108\trleft0\trqc \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx1500 @@ -60,7 +60,7 @@ \intbl\row\pard \trowd\trgaph108\trleft0\trqc \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx9000 -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Analysis: 2 Time: 19.2 N: 108 Event: 40 AHR: 0.75 Information fraction: 0.8 {\super c}}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Analysis: 2 Time: 19.2 N: 108 Events: 40 AHR: 0.75 Information fraction: 0.8 {\super c}}\cell \intbl\row\pard \trowd\trgaph108\trleft0\trqc \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx1500 @@ -78,7 +78,7 @@ \intbl\row\pard \trowd\trgaph108\trleft0\trqc \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx9000 -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Analysis: 3 Time: 24.5 N: 108 Event: 50 AHR: 0.71 Information fraction: 1 {\super c}}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Analysis: 3 Time: 24.5 N: 108 Events: 50 AHR: 0.71 Information fraction: 1 {\super c}}\cell \intbl\row\pard \trowd\trgaph108\trleft0\trqc \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx1500 diff --git a/tests/testthat/_snaps/independent_as_rtf/gs_power_wlr_footnote.rtf b/tests/testthat/_snaps/independent_as_rtf/gs_power_wlr_footnote.rtf index cfb51aa6..0135c9e9 100644 --- a/tests/testthat/_snaps/independent_as_rtf/gs_power_wlr_footnote.rtf +++ b/tests/testthat/_snaps/independent_as_rtf/gs_power_wlr_footnote.rtf @@ -42,7 +42,7 @@ \intbl\row\pard \trowd\trgaph108\trleft0\trqc \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx9000 -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Analysis: 1 Time: 14.9 N: 108 Event: 30 AHR: 0.79 Information fraction: 0.6 {\super b}}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Analysis: 1 Time: 14.9 N: 108 Events: 30 AHR: 0.79 Information fraction: 0.6 {\super b}}\cell \intbl\row\pard \trowd\trgaph108\trleft0\trqc \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx1500 @@ -74,7 +74,7 @@ \intbl\row\pard \trowd\trgaph108\trleft0\trqc \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx9000 -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Analysis: 2 Time: 19.2 N: 108 Event: 40 AHR: 0.75 Information fraction: 0.8 {\super b}}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Analysis: 2 Time: 19.2 N: 108 Events: 40 AHR: 0.75 Information fraction: 0.8 {\super b}}\cell \intbl\row\pard \trowd\trgaph108\trleft0\trqc \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx1500 @@ -106,7 +106,7 @@ \intbl\row\pard \trowd\trgaph108\trleft0\trqc \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx9000 -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Analysis: 3 Time: 24.5 N: 108 Event: 50 AHR: 0.71 Information fraction: 1 {\super b}}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Analysis: 3 Time: 24.5 N: 108 Events: 50 AHR: 0.71 Information fraction: 1 {\super b}}\cell \intbl\row\pard \trowd\trgaph108\trleft0\trqc \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx1500 diff --git a/tests/testthat/_snaps/independent_as_rtf/gs_power_wlr_futility_bound.rtf b/tests/testthat/_snaps/independent_as_rtf/gs_power_wlr_futility_bound.rtf index b04bcfdb..eb5f4dcf 100644 --- a/tests/testthat/_snaps/independent_as_rtf/gs_power_wlr_futility_bound.rtf +++ b/tests/testthat/_snaps/independent_as_rtf/gs_power_wlr_futility_bound.rtf @@ -42,7 +42,7 @@ \intbl\row\pard \trowd\trgaph108\trleft0\trqc \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx9000 -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Analysis: 1 Time: 14.9 N: 108 Event: 30 AHR: 0.79 Information fraction: 0.6 {\super c}}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Analysis: 1 Time: 14.9 N: 108 Events: 30 AHR: 0.79 Information fraction: 0.6 {\super c}}\cell \intbl\row\pard \trowd\trgaph108\trleft0\trqc \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx1500 @@ -60,7 +60,7 @@ \intbl\row\pard \trowd\trgaph108\trleft0\trqc \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx9000 -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Analysis: 2 Time: 19.2 N: 108 Event: 40 AHR: 0.75 Information fraction: 0.8 {\super c}}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Analysis: 2 Time: 19.2 N: 108 Events: 40 AHR: 0.75 Information fraction: 0.8 {\super c}}\cell \intbl\row\pard \trowd\trgaph108\trleft0\trqc \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx1500 @@ -78,7 +78,7 @@ \intbl\row\pard \trowd\trgaph108\trleft0\trqc \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx9000 -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Analysis: 3 Time: 24.5 N: 108 Event: 50 AHR: 0.71 Information fraction: 1 {\super c}}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Analysis: 3 Time: 24.5 N: 108 Events: 50 AHR: 0.71 Information fraction: 1 {\super c}}\cell \intbl\row\pard \trowd\trgaph108\trleft0\trqc \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx1500 diff --git a/tests/testthat/_snaps/independent_as_rtf/gs_power_wlr_spanner.rtf b/tests/testthat/_snaps/independent_as_rtf/gs_power_wlr_spanner.rtf index 5bd9678a..de497745 100644 --- a/tests/testthat/_snaps/independent_as_rtf/gs_power_wlr_spanner.rtf +++ b/tests/testthat/_snaps/independent_as_rtf/gs_power_wlr_spanner.rtf @@ -42,7 +42,7 @@ \intbl\row\pard \trowd\trgaph108\trleft0\trqc \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx9000 -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Analysis: 1 Time: 14.9 N: 108 Event: 30 AHR: 0.79 Information fraction: 0.6 {\super c}}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Analysis: 1 Time: 14.9 N: 108 Events: 30 AHR: 0.79 Information fraction: 0.6 {\super c}}\cell \intbl\row\pard \trowd\trgaph108\trleft0\trqc \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx1500 @@ -74,7 +74,7 @@ \intbl\row\pard \trowd\trgaph108\trleft0\trqc \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx9000 -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Analysis: 2 Time: 19.2 N: 108 Event: 40 AHR: 0.75 Information fraction: 0.8 {\super c}}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Analysis: 2 Time: 19.2 N: 108 Events: 40 AHR: 0.75 Information fraction: 0.8 {\super c}}\cell \intbl\row\pard \trowd\trgaph108\trleft0\trqc \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx1500 @@ -106,7 +106,7 @@ \intbl\row\pard \trowd\trgaph108\trleft0\trqc \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx9000 -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Analysis: 3 Time: 24.5 N: 108 Event: 50 AHR: 0.71 Information fraction: 1 {\super c}}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Analysis: 3 Time: 24.5 N: 108 Events: 50 AHR: 0.71 Information fraction: 1 {\super c}}\cell \intbl\row\pard \trowd\trgaph108\trleft0\trqc \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx1500 diff --git a/tests/testthat/_snaps/independent_as_rtf/gs_power_wlr_title.rtf b/tests/testthat/_snaps/independent_as_rtf/gs_power_wlr_title.rtf index be6de8c8..5db5aff9 100644 --- a/tests/testthat/_snaps/independent_as_rtf/gs_power_wlr_title.rtf +++ b/tests/testthat/_snaps/independent_as_rtf/gs_power_wlr_title.rtf @@ -42,7 +42,7 @@ \intbl\row\pard \trowd\trgaph108\trleft0\trqc \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx9000 -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Analysis: 1 Time: 14.9 N: 108 Event: 30 AHR: 0.79 Information fraction: 0.6 {\super c}}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Analysis: 1 Time: 14.9 N: 108 Events: 30 AHR: 0.79 Information fraction: 0.6 {\super c}}\cell \intbl\row\pard \trowd\trgaph108\trleft0\trqc \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx1500 @@ -74,7 +74,7 @@ \intbl\row\pard \trowd\trgaph108\trleft0\trqc \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx9000 -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Analysis: 2 Time: 19.2 N: 108 Event: 40 AHR: 0.75 Information fraction: 0.8 {\super c}}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Analysis: 2 Time: 19.2 N: 108 Events: 40 AHR: 0.75 Information fraction: 0.8 {\super c}}\cell \intbl\row\pard \trowd\trgaph108\trleft0\trqc \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx1500 @@ -106,7 +106,7 @@ \intbl\row\pard \trowd\trgaph108\trleft0\trqc \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx9000 -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Analysis: 3 Time: 24.5 N: 108 Event: 50 AHR: 0.71 Information fraction: 1 {\super c}}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Analysis: 3 Time: 24.5 N: 108 Events: 50 AHR: 0.71 Information fraction: 1 {\super c}}\cell \intbl\row\pard \trowd\trgaph108\trleft0\trqc \clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx1500 diff --git a/tests/testthat/test-developer-summary.R b/tests/testthat/test-developer-summary.R index 14f371d0..b1697e91 100644 --- a/tests/testthat/test-developer-summary.R +++ b/tests/testthat/test-developer-summary.R @@ -11,7 +11,7 @@ test_that("summary.gs_design() accepts same-length vectors for analysis_vars and extract_summary_analysis() expect_identical( observed, - paste0("Analysis: 1 Time: 12 N: 707.3 Event: 160.4 AHR: 0.81 Information fraction: ", round(x$analysis$event[1]/ max(x$analysis$event), 2)) + paste0("Analysis: 1 Time: 12 N: 707.3 Events: 160.4 AHR: 0.81 Information fraction: ", round(x$analysis$event[1]/ max(x$analysis$event), 2)) ) # specify the decimals for each variable @@ -24,7 +24,7 @@ test_that("summary.gs_design() accepts same-length vectors for analysis_vars and extract_summary_analysis() expect_identical( observed, - "Analysis: 1 Time: 12 N: 707 Event: 160 AHR: 0.8108 Information fraction: 0.4191" + "Analysis: 1 Time: 12 N: 707 Events: 160 AHR: 0.8108 Information fraction: 0.4191" ) # Drop variables and also specify the decimals @@ -50,7 +50,7 @@ test_that("summary.gs_design() accepts same-length vectors for analysis_vars and extract_summary_analysis() expect_identical( observed, - "Analysis: 1 Information fraction: 0.4191 AHR: 0.8108 Event: 160 N: 707 Time: 12" + "Analysis: 1 Information fraction: 0.4191 AHR: 0.8108 Events: 160 N: 707 Time: 12" ) # Throw error if unnamed analysis_decimals does not match length of analysis_vars @@ -74,7 +74,7 @@ test_that("summary.gs_design() accepts a named vector for analysis_decimals", { extract_summary_analysis() expect_identical( observed, - paste0("Analysis: 1 Time: 12 N: 707.3 Event: 160.4 AHR: 0.8108 Information fraction: ", round(x$analysis$event[1]/ max(x$analysis$event), 4)) + paste0("Analysis: 1 Time: 12 N: 707.3 Events: 160.4 AHR: 0.8108 Information fraction: ", round(x$analysis$event[1]/ max(x$analysis$event), 4)) ) # Specify decimals and also drop some variables @@ -87,7 +87,7 @@ test_that("summary.gs_design() accepts a named vector for analysis_decimals", { extract_summary_analysis() expect_identical( observed, - paste0("Analysis: 1 Event: 160.4 AHR: 0.8108 Information fraction: ", round(x$analysis$event[1]/max(x$analysis$event), 4)) + paste0("Analysis: 1 Events: 160.4 AHR: 0.8108 Information fraction: ", round(x$analysis$event[1]/max(x$analysis$event), 4)) ) # Specify decimals and rearrange some variables @@ -100,7 +100,7 @@ test_that("summary.gs_design() accepts a named vector for analysis_decimals", { extract_summary_analysis() expect_identical( observed, - paste0("Analysis: 1 Information fraction: ", round(x$analysis$event[1]/max(x$analysis$event), 4), " AHR: 0.8108 Event: 160.4") + paste0("Analysis: 1 Information fraction: ", round(x$analysis$event[1]/max(x$analysis$event), 4), " AHR: 0.8108 Events: 160.4") ) # Only drop variables @@ -112,7 +112,7 @@ test_that("summary.gs_design() accepts a named vector for analysis_decimals", { extract_summary_analysis() expect_identical( observed, - "Analysis: 1 Information fraction: 0.42 AHR: 0.81 Event: 160.4" + "Analysis: 1 Information fraction: 0.42 AHR: 0.81 Events: 160.4" ) # Throw error is analysis_decimals is unnamed From 9f43d60b70eccfd9b180d1817e0380eb973ba248 Mon Sep 17 00:00:00 2001 From: Yihui Xie Date: Fri, 6 Sep 2024 13:22:49 -0500 Subject: [PATCH 2/2] remove the unnecessary check --- R/summary.R | 4 ---- 1 file changed, 4 deletions(-) diff --git a/R/summary.R b/R/summary.R index 4cfdd8a1..08a17d98 100644 --- a/R/summary.R +++ b/R/summary.R @@ -329,10 +329,6 @@ summary.gs_design <- function(object, # If the method is WLR, change HR to wHR if (method == "wlr") xy <- replace_names(xy, c("~hr at bound" = "~whr at bound")) - # If the method is COMBO, remove the column of "~HR at bound", and remove AHR from header - if (method == "combo" && "~hr at bound" %in% names(xy)) - stop("'~hr at bound' can't be displayed!") - output <- table_ab( # A data frame to be show as the summary header # It has only ONE record for each value of `byvar`