diff --git a/main/coverage-report/index.html b/main/coverage-report/index.html index 1e9f8e02bc..b0d4852d67 100644 --- a/main/coverage-report/index.html +++ b/main/coverage-report/index.html @@ -94,7 +94,7 @@ font-size: 11px; }
-

tern coverage - 94.64%

+

tern coverage - 94.65%

-
- +
+
@@ -256,35 +256,35 @@

tern coverage - 94.64%

21 - 60x + 64x
  lst <- list(...)
22 - 60x + 64x
  maxdim <- max(lengths(lst))
23 - 60x + 64x
  res <- lapply(lst, rep, length.out = maxdim)
24 - 60x + 64x
  attr(res, "maxdim") <- maxdim
25 - 60x + 64x
  return(res)
@@ -424,14 +424,14 @@

tern coverage - 94.64%

45 - 18x + 20x
  if (missing(sides)) {
46 - 18x + 20x
    sides <- match.arg(sides)
@@ -445,7 +445,7 @@

tern coverage - 94.64%

48 - 18x + 20x
  if (missing(method)) {
@@ -466,14 +466,14 @@

tern coverage - 94.64%

51 - 18x + 20x
  iBinomDiffCI <- function(x1, n1, x2, n2, conf.level, sides, method) { # nolint
52 - 18x + 20x
    if (sides != "two.sided") {
@@ -494,49 +494,49 @@

tern coverage - 94.64%

55 - 18x + 20x
    alpha <- 1 - conf.level
56 - 18x + 20x
    kappa <- stats::qnorm(1 - alpha / 2)
57 - 18x + 20x
    p1_hat <- x1 / n1
58 - 18x + 20x
    p2_hat <- x2 / n2
59 - 18x + 20x
    est <- p1_hat - p2_hat
60 - 18x + 20x
    switch(method,
61 - 18x + 20x
      wald = {
@@ -578,42 +578,42 @@

tern coverage - 94.64%

67 - 18x + 20x
      waldcc = {
68 - 2x + 4x
        vd <- p1_hat * (1 - p1_hat) / n1 + p2_hat * (1 - p2_hat) / n2
69 - 2x + 4x
        term2 <- kappa * sqrt(vd)
70 - 2x + 4x
        term2 <- term2 + 0.5 * (1 / n1 + 1 / n2)
71 - 2x + 4x
        ci_lwr <- max(-1, est - term2)
72 - 2x + 4x
        ci_upr <- min(1, est + term2)
@@ -627,7 +627,7 @@

tern coverage - 94.64%

74 - 18x + 20x
      ac = {
@@ -718,7 +718,7 @@

tern coverage - 94.64%

87 - 18x + 20x
      exact = {
@@ -746,7 +746,7 @@

tern coverage - 94.64%

91 - 18x + 20x
      score = {
@@ -858,7 +858,7 @@

tern coverage - 94.64%

107 - 18x + 20x
      scorecc = {
@@ -970,7 +970,7 @@

tern coverage - 94.64%

123 - 18x + 20x
      mee = {
@@ -1222,7 +1222,7 @@

tern coverage - 94.64%

159 - 18x + 20x
      blj = {
@@ -1285,7 +1285,7 @@

tern coverage - 94.64%

168 - 18x + 20x
      ha = {
@@ -1327,7 +1327,7 @@

tern coverage - 94.64%

174 - 18x + 20x
      mn = {
@@ -1663,7 +1663,7 @@

tern coverage - 94.64%

222 - 18x + 20x
      beal = {
@@ -1747,7 +1747,7 @@

tern coverage - 94.64%

234 - 18x + 20x
      hal = {
@@ -1831,7 +1831,7 @@

tern coverage - 94.64%

246 - 18x + 20x
      jp = {
@@ -1922,21 +1922,21 @@

tern coverage - 94.64%

259 - 18x + 20x
    ci <- c(
260 - 18x + 20x
      est = est, lwr.ci = min(ci_lwr, ci_upr),
261 - 18x + 20x
      upr.ci = max(ci_lwr, ci_upr)
@@ -1950,7 +1950,7 @@

tern coverage - 94.64%

263 - 18x + 20x
    if (sides == "left") {
@@ -1964,7 +1964,7 @@

tern coverage - 94.64%

265 - 18x + 20x
    } else if (sides == "right") {
@@ -1985,7 +1985,7 @@

tern coverage - 94.64%

268 - 18x + 20x
    return(ci)
@@ -1999,35 +1999,35 @@

tern coverage - 94.64%

270 - 18x + 20x
  method <- match.arg(arg = method, several.ok = TRUE)
271 - 18x + 20x
  sides <- match.arg(arg = sides, several.ok = TRUE)
272 - 18x + 20x
  lst <- h_recycle(
273 - 18x + 20x
    x1 = x1, n1 = n1, x2 = x2, n2 = n2, conf.level = conf.level,
274 - 18x + 20x
    sides = sides, method = method
@@ -2041,35 +2041,35 @@

tern coverage - 94.64%

276 - 18x + 20x
  res <- t(sapply(1:attr(lst, "maxdim"), function(i) {
277 - 18x + 20x
    iBinomDiffCI(
278 - 18x + 20x
      x1 = lst$x1[i],
279 - 18x + 20x
      n1 = lst$n1[i], x2 = lst$x2[i], n2 = lst$n2[i], conf.level = lst$conf.level[i],
280 - 18x + 20x
      sides = lst$sides[i], method = lst$method[i]
@@ -2090,14 +2090,14 @@

tern coverage - 94.64%

283 - 18x + 20x
  lgn <- h_recycle(x1 = if (is.null(names(x1))) {
284 - 18x + 20x
    paste("x1", seq_along(x1), sep = ".")
@@ -2118,14 +2118,14 @@

tern coverage - 94.64%

287 - 18x + 20x
  }, n1 = if (is.null(names(n1))) {
288 - 18x + 20x
    paste("n1", seq_along(n1), sep = ".")
@@ -2146,14 +2146,14 @@

tern coverage - 94.64%

291 - 18x + 20x
  }, x2 = if (is.null(names(x2))) {
292 - 18x + 20x
    paste("x2", seq_along(x2), sep = ".")
@@ -2174,14 +2174,14 @@

tern coverage - 94.64%

295 - 18x + 20x
  }, n2 = if (is.null(names(n2))) {
296 - 18x + 20x
    paste("n2", seq_along(n2), sep = ".")
@@ -2202,49 +2202,49 @@

tern coverage - 94.64%

299 - 18x + 20x
  }, conf.level = conf.level, sides = sides, method = method)
300 - 18x + 20x
  xn <- apply(as.data.frame(lgn[sapply(lgn, function(x) {
301 - 126x + 140x
    length(unique(x)) !=
302 - 126x + 140x
      1
303 - 18x + 20x
  })]), 1, paste, collapse = ":")
304 - 18x + 20x
  rownames(res) <- xn
305 - 18x + 20x
  return(res)
@@ -10642,35 +10642,35 @@

tern coverage - 94.64%

47 - 19x + 23x
  checkmate::assert_string(.var)
48 - 19x + 23x
  assert_df_with_variables(df, list(tte = .var, is_event = is_event))
49 - 19x + 23x
  checkmate::assert_numeric(df[[.var]], min.len = 1, any.missing = FALSE)
50 - 19x + 23x
  checkmate::assert_number(time_point)
51 - 19x + 23x
  checkmate::assert_logical(df[[is_event]], min.len = 1, any.missing = FALSE)
@@ -10684,14 +10684,14 @@

tern coverage - 94.64%

53 - 19x + 23x
  conf_type <- control$conf_type
54 - 19x + 23x
  conf_level <- control$conf_level
@@ -10705,42 +10705,42 @@

tern coverage - 94.64%

56 - 19x + 23x
  formula <- stats::as.formula(paste0("survival::Surv(", .var, ", ", is_event, ") ~ 1"))
57 - 19x + 23x
  srv_fit <- survival::survfit(
58 - 19x + 23x
    formula = formula,
59 - 19x + 23x
    data = df,
60 - 19x + 23x
    conf.int = conf_level,
61 - 19x + 23x
    conf.type = conf_type
@@ -10754,21 +10754,21 @@

tern coverage - 94.64%

63 - 19x + 23x
  s_srv_fit <- summary(srv_fit, times = time_point, extend = TRUE)
64 - 19x + 23x
  df_srv_fit <- as.data.frame(s_srv_fit[c("time", "n.risk", "surv", "lower", "upper", "std.err")])
65 - 19x + 23x
  if (df_srv_fit[["n.risk"]] == 0) {
@@ -10796,28 +10796,28 @@

tern coverage - 94.64%

69 - 18x + 22x
    pt_at_risk <- df_srv_fit$n.risk
70 - 18x + 22x
    event_free_rate <- df_srv_fit$surv
71 - 18x + 22x
    rate_se <- df_srv_fit$std.err
72 - 18x + 22x
    rate_ci <- c(df_srv_fit$lower, df_srv_fit$upper)
@@ -10831,35 +10831,35 @@

tern coverage - 94.64%

74 - 19x + 23x
  list(
75 - 19x + 23x
    pt_at_risk = formatters::with_label(pt_at_risk, "Patients remaining at risk"),
76 - 19x + 23x
    event_free_rate = formatters::with_label(event_free_rate * 100, "Event Free Rate (%)"),
77 - 19x + 23x
    rate_se = formatters::with_label(rate_se * 100, "Standard Error of Event Free Rate"),
78 - 19x + 23x
    rate_ci = formatters::with_label(rate_ci * 100, f_conf_level(conf_level))
@@ -12056,7 +12056,7 @@

tern coverage - 94.64%

249 - 1x + 2x
                             c(rate_diff = 1L, rate_diff_ci = 2L, ztest_pval = 2L)
@@ -12084,14 +12084,14 @@

tern coverage - 94.64%

253 - 5x + 6x
  method <- match.arg(method)
254 - 5x + 6x
  checkmate::assert_string(table_names_suffix)
@@ -12105,21 +12105,21 @@

tern coverage - 94.64%

256 - 5x + 6x
  f <- list(
257 - 5x + 6x
    surv = c("pt_at_risk", "event_free_rate", "rate_se", "rate_ci"),
258 - 5x + 6x
    surv_diff = c("rate_diff", "rate_diff_ci", "ztest_pval")
@@ -12133,28 +12133,28 @@

tern coverage - 94.64%

260 - 5x + 6x
  .stats <- h_split_param(.stats, .stats, f = f)
261 - 5x + 6x
  .formats <- h_split_param(.formats, names(.formats), f = f)
262 - 5x + 6x
  .labels <- h_split_param(.labels, names(.labels), f = f)
263 - 5x + 6x
  .indent_mods <- h_split_param(.indent_mods, names(.indent_mods), f = f)
@@ -12168,42 +12168,42 @@

tern coverage - 94.64%

265 - 5x + 6x
  afun_surv <- make_afun(
266 - 5x + 6x
    a_surv_timepoint,
267 - 5x + 6x
    .stats = .stats$surv,
268 - 5x + 6x
    .formats = .formats$surv,
269 - 5x + 6x
    .labels = .labels$surv,
270 - 5x + 6x
    .indent_mods = .indent_mods$surv
@@ -12224,42 +12224,42 @@

tern coverage - 94.64%

273 - 5x + 6x
  afun_surv_diff <- make_afun(
274 - 5x + 6x
    a_surv_timepoint_diff,
275 - 5x + 6x
    .stats = .stats$surv_diff,
276 - 5x + 6x
    .formats = .formats$surv_diff,
277 - 5x + 6x
    .labels = .labels$surv_diff,
278 - 5x + 6x
    .indent_mods = .indent_mods$surv_diff
@@ -12280,7 +12280,7 @@

tern coverage - 94.64%

281 - 5x + 6x
  time_point <- list(...)$time_point
@@ -12294,14 +12294,14 @@

tern coverage - 94.64%

283 - 5x + 6x
  for (i in seq_along(time_point)) {
284 - 5x + 6x
    tpt <- time_point[i]
@@ -12315,98 +12315,98 @@

tern coverage - 94.64%

286 - 5x + 6x
    if (method %in% c("surv", "both")) {
287 - 3x + 4x
      lyt <- analyze(
288 - 3x + 4x
        lyt,
289 - 3x + 4x
        vars,
290 - 3x + 4x
        var_labels = paste(tpt, var_labels),
291 - 3x + 4x
        table_names = paste0("surv_", tpt, table_names_suffix),
292 - 3x + 4x
        show_labels = show_labels,
293 - 3x + 4x
        afun = afun_surv,
294 - 3x + 4x
        na_str = na_str,
295 - 3x + 4x
        nested = nested,
296 - 3x + 4x
        extra_args = list(
297 - 3x + 4x
          is_event = list(...)$is_event,
298 - 3x + 4x
          control = list(...)$control,
299 - 3x + 4x
          time_point = tpt
@@ -12441,98 +12441,98 @@

tern coverage - 94.64%

304 - 5x + 6x
    if (method %in% c("surv_diff", "both")) {
305 - 3x + 4x
      lyt <- analyze(
306 - 3x + 4x
        lyt,
307 - 3x + 4x
        vars,
308 - 3x + 4x
        var_labels = paste(tpt, var_labels),
309 - 3x + 4x
        table_names = paste0("surv_diff_", tpt, table_names_suffix),
310 - 3x + 4x
        show_labels = ifelse(method == "both", "hidden", show_labels),
311 - 3x + 4x
        afun = afun_surv_diff,
312 - 3x + 4x
        na_str = na_str,
313 - 3x + 4x
        nested = nested,
314 - 3x + 4x
        extra_args = list(
315 - 3x + 4x
          is_event = list(...)$is_event,
316 - 3x + 4x
          control = list(...)$control,
317 - 3x + 4x
          time_point = tpt
@@ -12567,7 +12567,7 @@

tern coverage - 94.64%

322 - 5x + 6x
  lyt
@@ -16953,7 +16953,7 @@

tern coverage - 94.64%

15 - 835x + 844x
  checkmate::assert_numeric(x)
@@ -16967,7 +16967,7 @@

tern coverage - 94.64%

17 - 835x + 844x
  if (finite) {
@@ -16981,7 +16981,7 @@

tern coverage - 94.64%

19 - 811x + 820x
  } else if (na.rm) {
@@ -17009,7 +17009,7 @@

tern coverage - 94.64%

23 - 835x + 844x
  if (length(x) == 0) {
@@ -17037,7 +17037,7 @@

tern coverage - 94.64%

27 - 788x + 797x
    rval <- c(min(x, na.rm = FALSE), max(x, na.rm = FALSE))
@@ -17058,7 +17058,7 @@

tern coverage - 94.64%

30 - 835x + 844x
  return(rval)
@@ -17149,14 +17149,14 @@

tern coverage - 94.64%

43 - 1305x + 1354x
  assert_proportion_value(conf_level)
44 - 1303x + 1352x
  paste0(conf_level * 100, "% CI")
@@ -17247,14 +17247,14 @@

tern coverage - 94.64%

57 - 334x + 343x
  checkmate::assert_numeric(test_mean, len = 1)
58 - 332x + 341x
  paste0("p-value (H0: mean = ", test_mean, ")")
@@ -18171,14 +18171,14 @@

tern coverage - 94.64%

189 - 15x + 16x
  checkmate::assert_numeric(x)
190 - 15x + 16x
  x / 30.4375
@@ -19620,7 +19620,7 @@

tern coverage - 94.64%

396 - 254x + 258x
  sum(!is.na(x))
@@ -21992,14 +21992,14 @@

tern coverage - 94.64%

312 - 21x + 25x
  y <- lapply(f, function(x) param[value %in% x])
313 - 21x + 25x
  lapply(y, function(x) if (length(x) == 0) NULL else x)
@@ -22733,42 +22733,42 @@

tern coverage - 94.64%

27 - 268x + 277x
  checkmate::assert_vector(quantiles, len = 2)
28 - 268x + 277x
  checkmate::assert_int(quantile_type, lower = 1, upper = 9)
29 - 268x + 277x
  checkmate::assert_numeric(test_mean)
30 - 268x + 277x
  lapply(quantiles, assert_proportion_value)
31 - 267x + 276x
  assert_proportion_value(conf_level)
32 - 266x + 275x
  list(conf_level = conf_level, quantiles = quantiles, quantile_type = quantile_type, test_mean = test_mean)
@@ -23006,14 +23006,14 @@

tern coverage - 94.64%

66 - 700x + 712x
  checkmate::assert_flag(na.rm)
67 - 700x + 712x
  UseMethod("s_summary", x)
@@ -23643,7 +23643,7 @@

tern coverage - 94.64%

157 - 331x + 340x
  checkmate::assert_numeric(x)
@@ -23657,14 +23657,14 @@

tern coverage - 94.64%

159 - 331x + 340x
  if (na.rm) {
160 - 330x + 339x
    x <- x[!is.na(x)]
@@ -23685,7 +23685,7 @@

tern coverage - 94.64%

163 - 331x + 340x
  y <- list()
@@ -23699,7 +23699,7 @@

tern coverage - 94.64%

165 - 331x + 340x
  y$n <- c("n" = length(x))
@@ -23713,7 +23713,7 @@

tern coverage - 94.64%

167 - 331x + 340x
  y$sum <- c("sum" = ifelse(length(x) == 0, NA_real_, sum(x, na.rm = FALSE)))
@@ -23727,7 +23727,7 @@

tern coverage - 94.64%

169 - 331x + 340x
  y$mean <- c("mean" = ifelse(length(x) == 0, NA_real_, mean(x, na.rm = FALSE)))
@@ -23741,7 +23741,7 @@

tern coverage - 94.64%

171 - 331x + 340x
  y$sd <- c("sd" = stats::sd(x, na.rm = FALSE))
@@ -23755,7 +23755,7 @@

tern coverage - 94.64%

173 - 331x + 340x
  y$se <- c("se" = stats::sd(x, na.rm = FALSE) / sqrt(length(stats::na.omit(x))))
@@ -23769,7 +23769,7 @@

tern coverage - 94.64%

175 - 331x + 340x
  y$mean_sd <- c(y$mean, "sd" = stats::sd(x, na.rm = FALSE))
@@ -23783,7 +23783,7 @@

tern coverage - 94.64%

177 - 331x + 340x
  y$mean_se <- c(y$mean, y$se)
@@ -23797,14 +23797,14 @@

tern coverage - 94.64%

179 - 331x + 340x
  mean_ci <- stat_mean_ci(x, conf_level = control$conf_level, na.rm = FALSE, gg_helper = FALSE)
180 - 331x + 340x
  y$mean_ci <- formatters::with_label(mean_ci, paste("Mean", f_conf_level(control$conf_level)))
@@ -23818,21 +23818,21 @@

tern coverage - 94.64%

182 - 331x + 340x
  mean_sei <- y$mean[[1]] + c(-1, 1) * stats::sd(x, na.rm = FALSE) / sqrt(y$n)
183 - 331x + 340x
  names(mean_sei) <- c("mean_sei_lwr", "mean_sei_upr")
184 - 331x + 340x
  y$mean_sei <- formatters::with_label(mean_sei, "Mean -/+ 1xSE")
@@ -23846,21 +23846,21 @@

tern coverage - 94.64%

186 - 331x + 340x
  mean_sdi <- y$mean[[1]] + c(-1, 1) * stats::sd(x, na.rm = FALSE)
187 - 331x + 340x
  names(mean_sdi) <- c("mean_sdi_lwr", "mean_sdi_upr")
188 - 331x + 340x
  y$mean_sdi <- formatters::with_label(mean_sdi, "Mean -/+ 1xSD")
@@ -23874,14 +23874,14 @@

tern coverage - 94.64%

190 - 331x + 340x
  mean_pval <- stat_mean_pval(x, test_mean = control$test_mean, na.rm = FALSE, n_min = 2)
191 - 331x + 340x
  y$mean_pval <- formatters::with_label(mean_pval, paste("Mean", f_pval(control$test_mean)))
@@ -23895,7 +23895,7 @@

tern coverage - 94.64%

193 - 331x + 340x
  y$median <- c("median" = stats::median(x, na.rm = FALSE))
@@ -23909,7 +23909,7 @@

tern coverage - 94.64%

195 - 331x + 340x
  y$mad <- c("mad" = stats::median(x - y$median, na.rm = FALSE))
@@ -23923,14 +23923,14 @@

tern coverage - 94.64%

197 - 331x + 340x
  median_ci <- stat_median_ci(x, conf_level = control$conf_level, na.rm = FALSE, gg_helper = FALSE)
198 - 331x + 340x
  y$median_ci <- formatters::with_label(median_ci, paste("Median", f_conf_level(control$conf_level)))
@@ -23944,14 +23944,14 @@

tern coverage - 94.64%

200 - 331x + 340x
  q <- control$quantiles
201 - 331x + 340x
  if (any(is.na(x))) {
@@ -23972,7 +23972,7 @@

tern coverage - 94.64%

204 - 330x + 339x
    qnts <- stats::quantile(x, probs = q, type = control$quantile_type, na.rm = FALSE)
@@ -23986,14 +23986,14 @@

tern coverage - 94.64%

206 - 331x + 340x
  names(qnts) <- paste("quantile", q, sep = "_")
207 - 331x + 340x
  y$quantiles <- formatters::with_label(qnts, paste0(paste(paste0(q * 100, "%"), collapse = " and "), "-ile"))
@@ -24007,28 +24007,28 @@

tern coverage - 94.64%

209 - 331x + 340x
  y$iqr <- c("iqr" = ifelse(
210 - 331x + 340x
    any(is.na(x)),
211 - 331x + 340x
    NA_real_,
212 - 331x + 340x
    stats::IQR(x, na.rm = FALSE, type = control$quantile_type)
@@ -24049,21 +24049,21 @@

tern coverage - 94.64%

215 - 331x + 340x
  y$range <- stats::setNames(range_noinf(x, na.rm = FALSE), c("min", "max"))
216 - 331x + 340x
  y$min <- y$range[1]
217 - 331x + 340x
  y$max <- y$range[2]
@@ -24077,7 +24077,7 @@

tern coverage - 94.64%

219 - 331x + 340x
  y$median_range <- formatters::with_label(c(y$median, y$range), "Median (Min - Max)")
@@ -24091,7 +24091,7 @@

tern coverage - 94.64%

221 - 331x + 340x
  y$cv <- c("cv" = unname(y$sd) / unname(y$mean) * 100)
@@ -24112,35 +24112,35 @@

tern coverage - 94.64%

224 - 331x + 340x
  x_no_negative_vals <- x
225 - 331x + 340x
  x_no_negative_vals[x_no_negative_vals <= 0] <- NA
226 - 331x + 340x
  y$geom_mean <- c("geom_mean" = exp(mean(log(x_no_negative_vals), na.rm = FALSE)))
227 - 331x + 340x
  geom_mean_ci <- stat_mean_ci(x, conf_level = control$conf_level, na.rm = FALSE, gg_helper = FALSE, geom_mean = TRUE)
228 - 331x + 340x
  y$geom_mean_ci <- formatters::with_label(geom_mean_ci, paste("Geometric Mean", f_conf_level(control$conf_level)))
@@ -24154,7 +24154,7 @@

tern coverage - 94.64%

230 - 331x + 340x
  y$geom_cv <- c("geom_cv" = sqrt(exp(stats::sd(log(x_no_negative_vals), na.rm = FALSE) ^ 2) - 1) * 100) # styler: off
@@ -24168,7 +24168,7 @@

tern coverage - 94.64%

232 - 331x + 340x
  y
@@ -24546,14 +24546,14 @@

tern coverage - 94.64%

286 - 274x + 280x
  assert_valid_factor(x)
287 - 271x + 277x
  denom <- match.arg(denom)
@@ -24567,14 +24567,14 @@

tern coverage - 94.64%

289 - 271x + 277x
  if (na.rm) {
290 - 267x + 273x
    x <- x[!is.na(x)] %>% fct_discard("<Missing>")
@@ -24609,7 +24609,7 @@

tern coverage - 94.64%

295 - 271x + 277x
  y <- list()
@@ -24623,7 +24623,7 @@

tern coverage - 94.64%

297 - 271x + 277x
  y$n <- length(x)
@@ -24637,35 +24637,35 @@

tern coverage - 94.64%

299 - 271x + 277x
  y$count <- as.list(table(x, useNA = "ifany"))
300 - 271x + 277x
  dn <- switch(denom,
301 - 271x + 277x
    n = length(x),
302 - 271x + 277x
    N_row = .N_row,
303 - 271x + 277x
    N_col = .N_col
@@ -24679,28 +24679,28 @@

tern coverage - 94.64%

305 - 271x + 277x
  y$count_fraction <- lapply(
306 - 271x + 277x
    y$count,
307 - 271x + 277x
    function(x) {
308 - 2089x + 2101x
      c(x, ifelse(dn > 0, x / dn, 0))
@@ -24728,7 +24728,7 @@

tern coverage - 94.64%

312 - 271x + 277x
  y$n_blq <- sum(grepl("BLQ|LTR|<[1-9]|<PCLLOQ", x))
@@ -24742,7 +24742,7 @@

tern coverage - 94.64%

314 - 271x + 277x
  y
@@ -25869,7 +25869,7 @@

tern coverage - 94.64%

475 - 293x + 308x
  if (lifecycle::is_present(na_level)) {
@@ -25904,28 +25904,28 @@

tern coverage - 94.64%

480 - 293x + 308x
  if (is.numeric(x)) {
481 - 68x + 77x
    type <- "numeric"
482 - 68x + 77x
    if (!is.null(.stats) && any(grepl("^pval", .stats))) {
483 - 9x + 12x
      .stats[grepl("^pval", .stats)] <- "pval" # tmp fix xxx
@@ -25946,14 +25946,14 @@

tern coverage - 94.64%

486 - 225x + 231x
    type <- "counts"
487 - 225x + 231x
    if (!is.null(.stats) && any(grepl("^pval", .stats))) {
@@ -26009,14 +26009,14 @@

tern coverage - 94.64%

495 - 293x + 308x
  x_stats <- if (!compare) {
496 - 274x + 286x
    s_summary(x = x, .N_col = .N_col, .N_row = .N_row, na.rm = na.rm, ...)
@@ -26030,14 +26030,14 @@

tern coverage - 94.64%

498 - 19x + 22x
    s_compare(
499 - 19x + 22x
      x = x, .N_col = .N_col, .N_row = .N_row, na.rm = na.rm, .ref_group = .ref_group, .in_ref_col = .in_ref_col, ...
@@ -26072,28 +26072,28 @@

tern coverage - 94.64%

504 - 293x + 308x
  met_grp <- paste0(c("analyze_vars", type), collapse = "_")
505 - 293x + 308x
  .stats <- get_stats(met_grp, stats_in = .stats, add_pval = compare)
506 - 293x + 308x
  .formats <- get_formats_from_stats(.stats, .formats)
507 - 293x + 308x
  .labels <- get_labels_from_stats(.stats, .labels)
@@ -26107,21 +26107,21 @@

tern coverage - 94.64%

509 - 293x + 308x
  indent_mods_custom <- .indent_mods
510 - 293x + 308x
  .indent_mods <- stats::setNames(rep(0L, length(.stats)), .stats)
511 - 293x + 308x
  if (!is.null(indent_mods_custom)) {
@@ -26177,7 +26177,7 @@

tern coverage - 94.64%

519 - 293x + 308x
  x_stats <- x_stats[.stats]
@@ -26198,21 +26198,21 @@

tern coverage - 94.64%

522 - 293x + 308x
  if (is.numeric(x)) {
523 - 68x + 77x
    default_labels <- get_labels_from_stats(.stats)
524 - 68x + 77x
    for (i in intersect(.stats, c("mean_ci", "mean_pval", "median_ci", "quantiles"))) {
@@ -26261,7 +26261,7 @@

tern coverage - 94.64%

531 - 293x + 308x
  if (is.factor(x) || is.character(x)) {
@@ -26275,35 +26275,35 @@

tern coverage - 94.64%

533 - 224x + 230x
    x_ungrp <- ungroup_stats(x_stats, .formats, .labels, .indent_mods)
534 - 224x + 230x
    x_stats <- x_ungrp[["x"]]
535 - 224x + 230x
    .formats <- x_ungrp[[".formats"]]
536 - 224x + 230x
    .labels <- gsub("fill-na-level", "NA", x_ungrp[[".labels"]])
537 - 224x + 230x
    .indent_mods <- x_ungrp[[".indent_mods"]]
@@ -26331,14 +26331,14 @@

tern coverage - 94.64%

541 - 293x + 308x
  fmt_is_auto <- vapply(.formats, function(ii) is.character(ii) && ii == "auto", logical(1))
542 - 293x + 308x
  if (any(fmt_is_auto)) {
@@ -26394,49 +26394,49 @@

tern coverage - 94.64%

550 - 293x + 308x
  in_rows(
551 - 293x + 308x
    .list = x_stats,
552 - 293x + 308x
    .formats = .formats,
553 - 293x + 308x
    .names = .labels,
554 - 293x + 308x
    .labels = .labels,
555 - 293x + 308x
    .indent_mods = .indent_mods,
556 - 293x + 308x
    .format_na_strs = na_str
@@ -27409,7 +27409,7 @@

tern coverage - 94.64%

695 - 20x + 22x
  if (lifecycle::is_present(na_level)) {
@@ -27444,7 +27444,7 @@

tern coverage - 94.64%

700 - 20x + 22x
  extra_args <- list(.stats = .stats, na.rm = na.rm, na_str = na_str, ...)
@@ -27479,84 +27479,84 @@

tern coverage - 94.64%

705 - 20x + 22x
  analyze(
706 - 20x + 22x
    lyt = lyt,
707 - 20x + 22x
    vars = vars,
708 - 20x + 22x
    var_labels = var_labels,
709 - 20x + 22x
    afun = a_summary,
710 - 20x + 22x
    na_str = na_str,
711 - 20x + 22x
    nested = nested,
712 - 20x + 22x
    extra_args = extra_args,
713 - 20x + 22x
    inclNAs = TRUE,
714 - 20x + 22x
    show_labels = show_labels,
715 - 20x + 22x
    table_names = table_names,
716 - 20x + 22x
    section_div = section_div
@@ -27968,42 +27968,42 @@

tern coverage - 94.64%

51 - 159x + 163x
  checkmate::assert_atomic(x)
52 - 159x + 163x
  checkmate::assert_string(x_name)
53 - 159x + 163x
  checkmate::assert_string(na_level)
54 - 159x + 163x
  checkmate::assert_flag(verbose)
55 - 159x + 163x
  if (is.factor(x)) {
56 - 144x + 148x
    return(x)
@@ -29088,35 +29088,35 @@

tern coverage - 94.64%

211 - 292x + 298x
  checkmate::assert_factor(x)
212 - 292x + 298x
  checkmate::assert_character(discard, any.missing = FALSE)
213 - 292x + 298x
  new_obs <- x[!(x %in% discard)]
214 - 292x + 298x
  new_levels <- setdiff(levels(x), discard)
215 - 292x + 298x
  factor(new_obs, levels = new_levels)
@@ -29683,28 +29683,28 @@

tern coverage - 94.64%

296 - 267x + 273x
  checkmate::assert_list(x)
297 - 267x + 273x
  empty_pval <- "pval" %in% names(x) && length(x[["pval"]]) == 0
298 - 267x + 273x
  empty_pval_counts <- "pval_counts" %in% names(x) && length(x[["pval_counts"]]) == 0
299 - 267x + 273x
  x <- unlist(x, recursive = FALSE)
@@ -29739,7 +29739,7 @@

tern coverage - 94.64%

304 - 267x + 273x
  .stats <- names(x)
@@ -29760,14 +29760,14 @@

tern coverage - 94.64%

307 - 267x + 273x
  .formats <- lapply(.stats, function(x) {
308 - 2228x + 2246x
    .formats[[if (!grepl("\\.", x)) x else regmatches(x, regexpr("\\.", x), invert = TRUE)[[1]][1]]]
@@ -29781,14 +29781,14 @@

tern coverage - 94.64%

310 - 267x + 273x
  .indent_mods <- sapply(.stats, function(x) {
311 - 2228x + 2246x
    .indent_mods[[if (!grepl("\\.", x)) x else regmatches(x, regexpr("\\.", x), invert = TRUE)[[1]][1]]]
@@ -29802,14 +29802,14 @@

tern coverage - 94.64%

313 - 267x + 273x
  .labels <- sapply(.stats, function(x) {
314 - 2177x + 2189x
    if (!grepl("\\.", x)) .labels[[x]] else regmatches(x, regexpr("\\.", x), invert = TRUE)[[1]][2]
@@ -29830,35 +29830,35 @@

tern coverage - 94.64%

317 - 267x + 273x
  list(
318 - 267x + 273x
    x = x,
319 - 267x + 273x
    .formats = .formats,
320 - 267x + 273x
    .labels = .labels,
321 - 267x + 273x
    .indent_mods = .indent_mods
@@ -56245,42 +56245,42 @@

tern coverage - 94.64%

178 - 4x + 5x
  afun <- make_afun(
179 - 4x + 5x
    a_coxph_pairwise,
180 - 4x + 5x
    .stats = .stats,
181 - 4x + 5x
    .formats = .formats,
182 - 4x + 5x
    .labels = .labels,
183 - 4x + 5x
    .indent_mods = .indent_mods
@@ -56294,70 +56294,70 @@

tern coverage - 94.64%

185 - 4x + 5x
  analyze(
186 - 4x + 5x
    lyt,
187 - 4x + 5x
    vars,
188 - 4x + 5x
    var_labels = var_labels,
189 - 4x + 5x
    show_labels = show_labels,
190 - 4x + 5x
    table_names = table_names,
191 - 4x + 5x
    afun = afun,
192 - 4x + 5x
    na_str = na_str,
193 - 4x + 5x
    nested = nested,
194 - 4x + 5x
    extra_args = list(...)
@@ -90420,21 +90420,21 @@

tern coverage - 94.64%

50 - 12x + 15x
  arm <- variables$arm
51 - 12x + 15x
  covariates <- variables$covariates
52 - 12x + 15x
  offset <- .df_row[[variables$offset]]
@@ -90448,14 +90448,14 @@

tern coverage - 94.64%

54 - 10x + 13x
  formula <- stats::as.formula(paste0(
55 - 10x + 13x
    .var, " ~ ",
@@ -90469,7 +90469,7 @@

tern coverage - 94.64%

57 - 10x + 13x
    paste(covariates, collapse = " + "),
@@ -90483,7 +90483,7 @@

tern coverage - 94.64%

59 - 10x + 13x
    arm
@@ -90504,35 +90504,35 @@

tern coverage - 94.64%

62 - 10x + 13x
  glm_fit <- stats::glm(
63 - 10x + 13x
    formula = formula,
64 - 10x + 13x
    offset = offset,
65 - 10x + 13x
    data = .df_row,
66 - 10x + 13x
    family = stats::poisson(link = "log")
@@ -90553,49 +90553,49 @@

tern coverage - 94.64%

69 - 10x + 13x
  emmeans_fit <- emmeans::emmeans(
70 - 10x + 13x
    glm_fit,
71 - 10x + 13x
    specs = arm,
72 - 10x + 13x
    data = .df_row,
73 - 10x + 13x
    type = "response",
74 - 10x + 13x
    offset = 0,
75 - 10x + 13x
    weights = weights
@@ -90616,21 +90616,21 @@

tern coverage - 94.64%

78 - 10x + 13x
  list(
79 - 10x + 13x
    glm_fit = glm_fit,
80 - 10x + 13x
    emmeans_fit = emmeans_fit
@@ -91169,7 +91169,7 @@

tern coverage - 94.64%

157 - 11x + 14x
  if (distribution == "negbin") {
@@ -91190,14 +91190,14 @@

tern coverage - 94.64%

160 - 9x + 12x
  switch(distribution,
161 - 9x + 12x
    poisson = h_glm_poisson(.var, .df_row, variables, weights),
@@ -92947,42 +92947,42 @@

tern coverage - 94.64%

411 - 1x + 2x
  afun <- make_afun(
412 - 1x + 2x
    a_glm_count,
413 - 1x + 2x
    .stats = .stats,
414 - 1x + 2x
    .formats = .formats,
415 - 1x + 2x
    .labels = .labels,
416 - 1x + 2x
    .indent_mods = .indent_mods
@@ -93003,70 +93003,70 @@

tern coverage - 94.64%

419 - 1x + 2x
  analyze(
420 - 1x + 2x
    lyt,
421 - 1x + 2x
    vars,
422 - 1x + 2x
    var_labels = var_labels,
423 - 1x + 2x
    show_labels = show_labels,
424 - 1x + 2x
    table_names = table_names,
425 - 1x + 2x
    afun = afun,
426 - 1x + 2x
    na_str = na_str,
427 - 1x + 2x
    nested = nested,
428 - 1x + 2x
    extra_args = list(...)
@@ -96732,7 +96732,7 @@

tern coverage - 94.64%

45 - 664x + 682x
  if (na.rm) {
@@ -96753,7 +96753,7 @@

tern coverage - 94.64%

48 - 664x + 682x
  n <- length(x)
@@ -96767,14 +96767,14 @@

tern coverage - 94.64%

50 - 664x + 682x
  if (!geom_mean) {
51 - 333x + 342x
    m <- mean(x)
@@ -96788,14 +96788,14 @@

tern coverage - 94.64%

53 - 331x + 340x
    negative_values_exist <- any(is.na(x[!is.na(x)]) <- x[!is.na(x)] <= 0)
54 - 331x + 340x
    if (negative_values_exist) {
@@ -96816,14 +96816,14 @@

tern coverage - 94.64%

57 - 309x + 318x
      x <- log(x)
58 - 309x + 318x
      m <- mean(x)
@@ -96851,7 +96851,7 @@

tern coverage - 94.64%

62 - 664x + 682x
  if (n < n_min || is.na(m)) {
@@ -96872,28 +96872,28 @@

tern coverage - 94.64%

65 - 564x + 582x
    hci <- stats::qt((1 + conf_level) / 2, df = n - 1) * stats::sd(x) / sqrt(n)
66 - 564x + 582x
    ci <- c(mean_ci_lwr = m - hci, mean_ci_upr = m + hci)
67 - 564x + 582x
    if (geom_mean) {
68 - 274x + 283x
      ci <- exp(ci)
@@ -96921,7 +96921,7 @@

tern coverage - 94.64%

72 - 664x + 682x
  if (gg_helper) {
@@ -96956,7 +96956,7 @@

tern coverage - 94.64%

77 - 664x + 682x
  return(ci)
@@ -97180,14 +97180,14 @@

tern coverage - 94.64%

109 - 334x + 343x
  x <- unname(x)
110 - 334x + 343x
  if (na.rm) {
@@ -97208,14 +97208,14 @@

tern coverage - 94.64%

113 - 334x + 343x
  n <- length(x)
114 - 334x + 343x
  med <- stats::median(x)
@@ -97229,7 +97229,7 @@

tern coverage - 94.64%

116 - 334x + 343x
  k <- stats::qbinom(p = (1 - conf_level) / 2, size = n, prob = 0.5, lower.tail = TRUE)
@@ -97250,7 +97250,7 @@

tern coverage - 94.64%

119 - 334x + 343x
  if (k == 0 || is.na(med)) {
@@ -97278,21 +97278,21 @@

tern coverage - 94.64%

123 - 255x + 264x
    x_sort <- sort(x)
124 - 255x + 264x
    ci <- c(median_ci_lwr = x_sort[k], median_ci_upr = x_sort[n - k + 1])
125 - 255x + 264x
    empir_conf_level <- 1 - 2 * stats::pbinom(k - 1, size = n, prob = 0.5)
@@ -97313,7 +97313,7 @@

tern coverage - 94.64%

128 - 334x + 343x
  if (gg_helper) {
@@ -97341,7 +97341,7 @@

tern coverage - 94.64%

132 - 334x + 343x
  attr(ci, "conf_level") <- empir_conf_level
@@ -97355,7 +97355,7 @@

tern coverage - 94.64%

134 - 334x + 343x
  return(ci)
@@ -97530,7 +97530,7 @@

tern coverage - 94.64%

159 - 335x + 344x
  if (na.rm) {
@@ -97551,7 +97551,7 @@

tern coverage - 94.64%

162 - 335x + 344x
  n <- length(x)
@@ -97565,14 +97565,14 @@

tern coverage - 94.64%

164 - 335x + 344x
  x_mean <- mean(x)
165 - 335x + 344x
  x_sd <- stats::sd(x)
@@ -97586,7 +97586,7 @@

tern coverage - 94.64%

167 - 335x + 344x
  if (n < n_min) {
@@ -97607,21 +97607,21 @@

tern coverage - 94.64%

170 - 293x + 302x
    x_se <- stats::sd(x) / sqrt(n)
171 - 293x + 302x
    ttest <- (x_mean - test_mean) / x_se
172 - 293x + 302x
    pv <- c(p_value = 2 * stats::pt(-abs(ttest), df = n - 1))
@@ -97642,7 +97642,7 @@

tern coverage - 94.64%

175 - 335x + 344x
  return(pv)
@@ -98411,21 +98411,21 @@

tern coverage - 94.64%

53 - 369x + 384x
  checkmate::assert_character(method_groups)
54 - 369x + 384x
  checkmate::assert_character(stats_in, null.ok = TRUE)
55 - 369x + 384x
  checkmate::assert_flag(add_pval)
@@ -98446,7 +98446,7 @@

tern coverage - 94.64%

58 - 369x + 384x
  if (any(method_groups == "analyze_vars")) {
@@ -98474,7 +98474,7 @@

tern coverage - 94.64%

62 - 369x + 384x
  type_tmp <- ifelse(any(grepl("counts", method_groups)), "counts", "numeric") # for pval checks
@@ -98495,7 +98495,7 @@

tern coverage - 94.64%

65 - 369x + 384x
  out <- NULL
@@ -98516,7 +98516,7 @@

tern coverage - 94.64%

68 - 369x + 384x
  for (mgi in method_groups) {
@@ -98530,63 +98530,63 @@

tern coverage - 94.64%

70 - 379x + 394x
    out_tmp <- switch(mgi,
71 - 379x + 394x
      "count_occurrences" = c("count", "count_fraction", "count_fraction_fixed_dp", "fraction"),
72 - 379x + 394x
      "summarize_num_patients" = c("unique", "nonunique", "unique_count"),
73 - 379x + 394x
      "analyze_vars_counts" = c("n", "count", "count_fraction", "n_blq"),
74 - 379x + 394x
      "analyze_vars_numeric" = c(
75 - 379x + 394x
        "n", "sum", "mean", "sd", "se", "mean_sd", "mean_se", "mean_ci", "mean_sei",
76 - 379x + 394x
        "mean_sdi", "mean_pval", "median", "mad", "median_ci", "quantiles", "iqr",
77 - 379x + 394x
        "range", "min", "max", "median_range", "cv", "geom_mean", "geom_mean_ci",
78 - 379x + 394x
        "geom_cv"
@@ -98600,14 +98600,14 @@

tern coverage - 94.64%

80 - 379x + 394x
      stop(
81 - 379x + 394x
        "The selected method group (", mgi, ") has no default statistical method."
@@ -98628,7 +98628,7 @@

tern coverage - 94.64%

84 - 379x + 394x
    out <- unique(c(out, out_tmp))
@@ -98656,14 +98656,14 @@

tern coverage - 94.64%

88 - 369x + 384x
  if (!is.null(stats_in) && any(grepl("^pval", stats_in))) {
89 - 21x + 24x
    stats_in_pval_value <- stats_in[grepl("^pval", stats_in)]
@@ -98684,7 +98684,7 @@

tern coverage - 94.64%

92 - 21x + 24x
    checkmate::assert_choice(stats_in_pval_value, c("pval", "pval_counts"))
@@ -98705,14 +98705,14 @@

tern coverage - 94.64%

95 - 20x + 23x
    if (any(grepl("counts", method_groups)) && stats_in_pval_value != "pval_counts" ||
96 - 20x + 23x
      any(grepl("numeric", method_groups)) && stats_in_pval_value != "pval") { # nolint
@@ -98775,7 +98775,7 @@

tern coverage - 94.64%

105 - 18x + 21x
    add_pval <- TRUE
@@ -98803,14 +98803,14 @@

tern coverage - 94.64%

109 - 366x + 381x
  if (isTRUE(add_pval)) {
110 - 22x + 25x
    if (any(grepl("counts", method_groups))) {
@@ -98831,7 +98831,7 @@

tern coverage - 94.64%

113 - 12x + 15x
      out <- unique(c(out, "pval"))
@@ -98866,14 +98866,14 @@

tern coverage - 94.64%

118 - 366x + 381x
  if (!is.null(stats_in)) {
119 - 347x + 362x
    out <- intersect(stats_in, out) # It orders them too
@@ -98901,7 +98901,7 @@

tern coverage - 94.64%

123 - 366x + 381x
  if (length(out) == 0) {
@@ -98957,7 +98957,7 @@

tern coverage - 94.64%

131 - 364x + 379x
  out
@@ -99174,7 +99174,7 @@

tern coverage - 94.64%

162 - 366x + 381x
  checkmate::assert_character(stats, min.len = 1)
@@ -99188,14 +99188,14 @@

tern coverage - 94.64%

164 - 366x + 381x
  if (checkmate::test_list(formats_in, null.ok = TRUE)) {
165 - 322x + 337x
    checkmate::assert_list(formats_in, null.ok = TRUE)
@@ -99244,7 +99244,7 @@

tern coverage - 94.64%

172 - 366x + 381x
  which_fmt <- match(stats, names(tern_default_formats))
@@ -99265,14 +99265,14 @@

tern coverage - 94.64%

175 - 366x + 381x
  ret <- vector("list", length = length(stats)) # Returning a list is simpler
176 - 366x + 381x
  ret[!is.na(which_fmt)] <- tern_default_formats[which_fmt[!is.na(which_fmt)]]
@@ -99286,7 +99286,7 @@

tern coverage - 94.64%

178 - 366x + 381x
  out <- setNames(ret, stats)
@@ -99307,7 +99307,7 @@

tern coverage - 94.64%

181 - 366x + 381x
  if (!is.null(formats_in)) {
@@ -99349,7 +99349,7 @@

tern coverage - 94.64%

187 - 366x + 381x
  out
@@ -99552,14 +99552,14 @@

tern coverage - 94.64%

216 - 419x + 443x
  checkmate::assert_character(stats, min.len = 1)
217 - 419x + 443x
  checkmate::assert_character(row_nms, null.ok = TRUE)
@@ -99573,14 +99573,14 @@

tern coverage - 94.64%

219 - 419x + 443x
  if (checkmate::test_list(labels_in, null.ok = TRUE)) {
220 - 367x + 391x
    checkmate::assert_list(labels_in, null.ok = TRUE)
@@ -99622,7 +99622,7 @@

tern coverage - 94.64%

226 - 419x + 443x
  if (!is.null(row_nms)) {
@@ -99685,7 +99685,7 @@

tern coverage - 94.64%

235 - 376x + 400x
    which_lbl <- match(stats, names(tern_default_labels))
@@ -99699,14 +99699,14 @@

tern coverage - 94.64%

237 - 376x + 400x
    ret <- vector("character", length = length(stats)) # it needs to be a character vector
238 - 376x + 400x
    ret[!is.na(which_lbl)] <- tern_default_labels[which_lbl[!is.na(which_lbl)]]
@@ -99720,7 +99720,7 @@

tern coverage - 94.64%

240 - 376x + 400x
    out <- setNames(ret, stats)
@@ -99748,7 +99748,7 @@

tern coverage - 94.64%

244 - 419x + 443x
  if (!is.null(labels_in)) {
@@ -99790,7 +99790,7 @@

tern coverage - 94.64%

250 - 419x + 443x
  out
@@ -105946,7 +105946,7 @@

tern coverage - 94.64%

42 - 28x + 31x
  UseMethod("s_compare", x)
@@ -106121,21 +106121,21 @@

tern coverage - 94.64%

67 - 12x + 15x
  checkmate::assert_numeric(x)
68 - 12x + 15x
  checkmate::assert_numeric(.ref_group)
69 - 12x + 15x
  checkmate::assert_flag(.in_ref_col)
@@ -106149,7 +106149,7 @@

tern coverage - 94.64%

71 - 12x + 15x
  y <- s_summary.numeric(x = x, ...)
@@ -106163,14 +106163,14 @@

tern coverage - 94.64%

73 - 12x + 15x
  y$pval <- if (!.in_ref_col && n_available(x) > 1 && n_available(.ref_group) > 1) {
74 - 9x + 11x
    stats::t.test(x, .ref_group)$p.value
@@ -106184,7 +106184,7 @@

tern coverage - 94.64%

76 - 3x + 4x
    character()
@@ -106205,7 +106205,7 @@

tern coverage - 94.64%

79 - 12x + 15x
  y
@@ -108333,7 +108333,7 @@

tern coverage - 94.64%

383 - 3x + 4x
  if (lifecycle::is_present(na_level)) {
@@ -108368,7 +108368,7 @@

tern coverage - 94.64%

388 - 3x + 4x
  extra_args <- list(.stats = .stats, na.rm = na.rm, na_str = na_str, compare = TRUE, ...)
@@ -108403,84 +108403,84 @@

tern coverage - 94.64%

393 - 3x + 4x
  analyze(
394 - 3x + 4x
    lyt = lyt,
395 - 3x + 4x
    vars = vars,
396 - 3x + 4x
    var_labels = var_labels,
397 - 3x + 4x
    afun = a_summary,
398 - 3x + 4x
    na_str = na_str,
399 - 3x + 4x
    nested = nested,
400 - 3x + 4x
    extra_args = extra_args,
401 - 3x + 4x
    inclNAs = TRUE,
402 - 3x + 4x
    show_labels = show_labels,
403 - 3x + 4x
    table_names = table_names,
404 - 3x + 4x
    section_div = section_div
@@ -109213,28 +109213,28 @@

tern coverage - 94.64%

41 - 15x + 18x
  checkmate::assert_string(.var)
42 - 15x + 18x
  checkmate::assert_list(variables)
43 - 15x + 18x
  checkmate::assert_subset(names(variables), c("arm", "covariates"))
44 - 15x + 18x
  assert_df_with_variables(.df_row, list(rsp = .var))
@@ -109248,21 +109248,21 @@

tern coverage - 94.64%

46 - 14x + 17x
  arm <- variables$arm
47 - 14x + 17x
  covariates <- variables$covariates
48 - 14x + 17x
  if (!is.null(covariates) && length(covariates) > 0) {
@@ -109304,14 +109304,14 @@

tern coverage - 94.64%

54 - 13x + 16x
  covariates_part <- paste(covariates, collapse = " + ")
55 - 13x + 16x
  if (covariates_part != "") {
@@ -109332,7 +109332,7 @@

tern coverage - 94.64%

58 - 3x + 6x
    formula <- stats::as.formula(paste0(.var, " ~ ", arm))
@@ -109353,14 +109353,14 @@

tern coverage - 94.64%

61 - 13x + 16x
  if (is.null(interaction_item)) {
62 - 9x + 12x
    specs <- arm
@@ -109395,21 +109395,21 @@

tern coverage - 94.64%

67 - 13x + 16x
  lm_fit <- stats::lm(
68 - 13x + 16x
    formula = formula,
69 - 13x + 16x
    data = .df_row
@@ -109423,14 +109423,14 @@

tern coverage - 94.64%

71 - 13x + 16x
  emmeans_fit <- emmeans::emmeans(
72 - 13x + 16x
    lm_fit,
@@ -109444,7 +109444,7 @@

tern coverage - 94.64%

74 - 13x + 16x
    specs = specs,
@@ -109458,7 +109458,7 @@

tern coverage - 94.64%

76 - 13x + 16x
    data = .df_row
@@ -109479,7 +109479,7 @@

tern coverage - 94.64%

79 - 13x + 16x
  emmeans_fit
@@ -110732,56 +110732,56 @@

tern coverage - 94.64%

258 - 3x + 4x
  afun <- make_afun(
259 - 3x + 4x
    a_ancova,
260 - 3x + 4x
    interaction_y = interaction_y,
261 - 3x + 4x
    interaction_item = interaction_item,
262 - 3x + 4x
    .stats = .stats,
263 - 3x + 4x
    .formats = .formats,
264 - 3x + 4x
    .labels = .labels,
265 - 3x + 4x
    .indent_mods = .indent_mods
@@ -110802,70 +110802,70 @@

tern coverage - 94.64%

268 - 3x + 4x
  analyze(
269 - 3x + 4x
    lyt,
270 - 3x + 4x
    vars,
271 - 3x + 4x
    var_labels = var_labels,
272 - 3x + 4x
    show_labels = show_labels,
273 - 3x + 4x
    table_names = table_names,
274 - 3x + 4x
    afun = afun,
275 - 3x + 4x
    na_str = na_str,
276 - 3x + 4x
    nested = nested,
277 - 3x + 4x
    extra_args = list(...)
@@ -114328,42 +114328,42 @@

tern coverage - 94.64%

204 - 3x + 4x
  afun <- make_afun(
205 - 3x + 4x
    a_proportion_diff,
206 - 3x + 4x
    .stats = .stats,
207 - 3x + 4x
    .formats = .formats,
208 - 3x + 4x
    .labels = .labels,
209 - 3x + 4x
    .indent_mods = .indent_mods
@@ -114384,70 +114384,70 @@

tern coverage - 94.64%

212 - 3x + 4x
  analyze(
213 - 3x + 4x
    lyt,
214 - 3x + 4x
    vars,
215 - 3x + 4x
    afun = afun,
216 - 3x + 4x
    var_labels = var_labels,
217 - 3x + 4x
    na_str = na_str,
218 - 3x + 4x
    nested = nested,
219 - 3x + 4x
    extra_args = list(...),
220 - 3x + 4x
    show_labels = show_labels,
221 - 3x + 4x
    table_names = table_names
@@ -114573,28 +114573,28 @@

tern coverage - 94.64%

239 - 17x + 19x
  checkmate::assert_logical(rsp, any.missing = FALSE)
240 - 17x + 19x
  checkmate::assert_factor(grp, len = length(rsp), any.missing = FALSE, n.levels = 2)
241 - 17x + 19x
  checkmate::assert_number(conf_level, lower = 0, upper = 1)
242 - 17x + 19x
  checkmate::assert_flag(correct, null.ok = TRUE)
@@ -114608,7 +114608,7 @@

tern coverage - 94.64%

244 - 17x + 19x
  if (!is.null(strata)) {
@@ -114636,7 +114636,7 @@

tern coverage - 94.64%

248 - 17x + 19x
  invisible()
@@ -114783,14 +114783,14 @@

tern coverage - 94.64%

269 - 8x + 11x
  label <- paste0(conf_level * 100, "% CI")
270 - 8x + 11x
  if (long) {
@@ -114867,70 +114867,70 @@

tern coverage - 94.64%

281 - 8x + 11x
  method_part <- switch(method,
282 - 8x + 11x
    "cmh" = "CMH, without correction",
283 - 8x + 11x
    "waldcc" = "Wald, with correction",
284 - 8x + 11x
    "wald" = "Wald, without correction",
285 - 8x + 11x
    "ha" = "Anderson-Hauck",
286 - 8x + 11x
    "newcombe" = "Newcombe, without correction",
287 - 8x + 11x
    "newcombecc" = "Newcombe, with correction",
288 - 8x + 11x
    "strat_newcombe" = "Stratified Newcombe, without correction",
289 - 8x + 11x
    "strat_newcombecc" = "Stratified Newcombe, with correction",
290 - 8x + 11x
    stop(paste(method, "does not have a description"))
@@ -114944,7 +114944,7 @@

tern coverage - 94.64%

292 - 8x + 11x
  paste0(label, " (", method_part, ")")
@@ -115224,14 +115224,14 @@

tern coverage - 94.64%

332 - 2x + 4x
  if (isTRUE(correct)) {
333 - 1x + 3x
    mthd <- "waldcc"
@@ -115259,21 +115259,21 @@

tern coverage - 94.64%

337 - 2x + 4x
  grp <- as_factor_keep_attributes(grp)
338 - 2x + 4x
  check_diff_prop_ci(
339 - 2x + 4x
    rsp = rsp, grp = grp, conf_level = conf_level, correct = correct
@@ -115301,14 +115301,14 @@

tern coverage - 94.64%

343 - 2x + 4x
  checkmate::assert_logical(rsp, any.missing = FALSE)
344 - 2x + 4x
  checkmate::assert_factor(grp, len = length(rsp), any.missing = FALSE, n.levels = 2)
@@ -115322,7 +115322,7 @@

tern coverage - 94.64%

346 - 2x + 4x
  tbl <- table(grp, factor(rsp, levels = c(TRUE, FALSE)))
@@ -115336,35 +115336,35 @@

tern coverage - 94.64%

348 - 2x + 4x
  diff_ci <- desctools_binom(
349 - 2x + 4x
    x1 = tbl[2], n1 = sum(tbl[2], tbl[4]),
350 - 2x + 4x
    x2 = tbl[1], n2 = sum(tbl[1], tbl[3]),
351 - 2x + 4x
    conf.level = conf_level,
352 - 2x + 4x
    method = mthd
@@ -115385,21 +115385,21 @@

tern coverage - 94.64%

355 - 2x + 4x
  list(
356 - 2x + 4x
    "diff" = unname(diff_ci[, "est"]),
357 - 2x + 4x
    "diff_ci" = unname(diff_ci[, c("lwr.ci", "upr.ci")])
@@ -124983,21 +124983,21 @@

tern coverage - 94.64%

20 - 40x + 43x
  pval_method <- match.arg(pval_method)
21 - 39x + 42x
  ties <- match.arg(ties)
22 - 39x + 42x
  assert_proportion_value(conf_level)
@@ -125011,7 +125011,7 @@

tern coverage - 94.64%

24 - 38x + 41x
  list(pval_method = pval_method, ties = ties, conf_level = conf_level)
@@ -125312,35 +125312,35 @@

tern coverage - 94.64%

67 - 30x + 36x
  conf_type <- match.arg(conf_type)
68 - 29x + 35x
  assert_proportion_value(conf_level)
69 - 28x + 34x
  list(
70 - 28x + 34x
    conf_level = conf_level,
71 - 28x + 34x
    conf_type = conf_type
@@ -128963,7 +128963,7 @@

tern coverage - 94.64%

22 - 2207x + 2232x
  x <- Filter(Negate(is.null), x)
@@ -128977,35 +128977,35 @@

tern coverage - 94.64%

24 - 2207x + 2232x
  res <- checkmate::check_list(x,
25 - 2207x + 2232x
    names = "named",
26 - 2207x + 2232x
    min.len = 1,
27 - 2207x + 2232x
    any.missing = FALSE,
28 - 2207x + 2232x
    types = "character"
@@ -129026,14 +129026,14 @@

tern coverage - 94.64%

31 - 2207x + 2232x
  if (isTRUE(res)) {
32 - 2202x + 2227x
    res <- checkmate::check_character(unlist(x), min.chars = 1)
@@ -129047,7 +129047,7 @@

tern coverage - 94.64%

34 - 2207x + 2232x
  return(res)
@@ -129110,14 +129110,14 @@

tern coverage - 94.64%

43 - 1973x + 1998x
  checkmate::assert_data_frame(df)
44 - 1971x + 1996x
  assert_list_of_variables(variables)
@@ -129138,14 +129138,14 @@

tern coverage - 94.64%

47 - 1969x + 1994x
  err_flag <- all(unlist(variables) %in% colnames(df))
48 - 1969x + 1994x
  checkmate::assert_flag(err_flag)
@@ -129159,7 +129159,7 @@

tern coverage - 94.64%

50 - 1969x + 1994x
  if (isFALSE(err_flag)) {
@@ -129222,7 +129222,7 @@

tern coverage - 94.64%

59 - 1964x + 1989x
  if (!is.null(na_level)) {
@@ -129306,7 +129306,7 @@

tern coverage - 94.64%

71 - 1963x + 1988x
  return(TRUE)
@@ -129425,7 +129425,7 @@

tern coverage - 94.64%

88 - 846x + 854x
  checkmate::assert_int(min.levels, lower = 1)
@@ -129446,42 +129446,42 @@

tern coverage - 94.64%

91 - 846x + 854x
  res <- checkmate::check_factor(x,
92 - 846x + 854x
    min.levels = min.levels,
93 - 846x + 854x
    null.ok = null.ok,
94 - 846x + 854x
    max.levels = max.levels,
95 - 846x + 854x
    any.missing = any.missing,
96 - 846x + 854x
    n.levels = n.levels
@@ -129509,14 +129509,14 @@

tern coverage - 94.64%

100 - 846x + 854x
  if (isTRUE(res)) {
101 - 832x + 840x
    res <- checkmate::check_character(levels(x), min.chars = 1)
@@ -129537,7 +129537,7 @@

tern coverage - 94.64%

104 - 846x + 854x
  return(res)
@@ -129642,7 +129642,7 @@

tern coverage - 94.64%

119 - 190x + 192x
  res <- check_df_with_variables(df, variables, na_level)
@@ -129656,7 +129656,7 @@

tern coverage - 94.64%

121 - 189x + 191x
  if (isTRUE(res)) {
@@ -129670,42 +129670,42 @@

tern coverage - 94.64%

123 - 187x + 189x
    res <- lapply(
124 - 187x + 189x
      X = as.list(df)[unlist(variables)],
125 - 187x + 189x
      FUN = check_valid_factor,
126 - 187x + 189x
      min.levels = min.levels,
127 - 187x + 189x
      max.levels = max.levels,
128 - 187x + 189x
      any.missing = any.missing
@@ -129719,14 +129719,14 @@

tern coverage - 94.64%

130 - 187x + 189x
    res_lo <- unlist(vapply(res, Negate(isTRUE), logical(1)))
131 - 187x + 189x
    if (any(res_lo)) {
@@ -129789,7 +129789,7 @@

tern coverage - 94.64%

140 - 181x + 183x
      res <- TRUE
@@ -129810,7 +129810,7 @@

tern coverage - 94.64%

143 - 183x + 185x
  return(res)
@@ -129901,35 +129901,35 @@

tern coverage - 94.64%

156 - 7068x + 7169x
  checkmate::assert_number(x, lower = 0, upper = 1)
157 - 7056x + 7157x
  checkmate::assert_flag(include_boundaries)
158 - 7056x + 7157x
  if (isFALSE(include_boundaries)) {
159 - 3011x + 3100x
    checkmate::assert_true(x > 0)
160 - 3009x + 3098x
    checkmate::assert_true(x < 1)
@@ -131349,42 +131349,42 @@

tern coverage - 94.64%

200 - 3x + 4x
  afun <- make_afun(
201 - 3x + 4x
    a_odds_ratio,
202 - 3x + 4x
    .stats = .stats,
203 - 3x + 4x
    .formats = .formats,
204 - 3x + 4x
    .labels = .labels,
205 - 3x + 4x
    .indent_mods = .indent_mods
@@ -131405,63 +131405,63 @@

tern coverage - 94.64%

208 - 3x + 4x
  analyze(
209 - 3x + 4x
    lyt,
210 - 3x + 4x
    vars,
211 - 3x + 4x
    afun = afun,
212 - 3x + 4x
    na_str = na_str,
213 - 3x + 4x
    nested = nested,
214 - 3x + 4x
    extra_args = list(...),
215 - 3x + 4x
    show_labels = show_labels,
216 - 3x + 4x
    table_names = table_names
@@ -131727,28 +131727,28 @@

tern coverage - 94.64%

254 - 55x + 57x
  checkmate::assert_logical(data$rsp)
255 - 55x + 57x
  assert_proportion_value(conf_level)
256 - 55x + 57x
  assert_df_with_variables(data, list(rsp = "rsp", grp = "grp"))
257 - 55x + 57x
  checkmate::assert_multi_class(data$grp, classes = c("factor", "character"))
@@ -131762,42 +131762,42 @@

tern coverage - 94.64%

259 - 55x + 57x
  data$grp <- as_factor_keep_attributes(data$grp)
260 - 55x + 57x
  assert_df_with_factors(data, list(val = "grp"), min.levels = 2, max.levels = 2)
261 - 55x + 57x
  formula <- stats::as.formula("rsp ~ grp")
262 - 55x + 57x
  model_fit <- stats::glm(
263 - 55x + 57x
    formula = formula, data = data,
264 - 55x + 57x
    family = stats::binomial(link = "logit")
@@ -131825,21 +131825,21 @@

tern coverage - 94.64%

268 - 55x + 57x
  or <- exp(stats::coef(model_fit)[-1])
269 - 55x + 57x
  or_ci <- exp(
270 - 55x + 57x
    stats::confint.default(model_fit, level = conf_level)[-1, , drop = FALSE]
@@ -131860,14 +131860,14 @@

tern coverage - 94.64%

273 - 55x + 57x
  values <- stats::setNames(c(or, or_ci), c("est", "lcl", "ucl"))
274 - 55x + 57x
  n_tot <- stats::setNames(nrow(model_fit$model), "n_tot")
@@ -131881,7 +131881,7 @@

tern coverage - 94.64%

276 - 55x + 57x
  list(or_ci = values, n_tot = n_tot)
@@ -142775,49 +142775,49 @@

tern coverage - 94.64%

84 - 41x + 44x
  checkmate::assert_string(method)
85 - 41x + 44x
  meth_part <- switch(method,
86 - 41x + 44x
    "schouten" = "Chi-Squared Test with Schouten Correction",
87 - 41x + 44x
    "chisq" = "Chi-Squared Test",
88 - 41x + 44x
    "cmh" = "Cochran-Mantel-Haenszel Test",
89 - 41x + 44x
    "fisher" = "Fisher's Exact Test",
90 - 41x + 44x
    stop(paste(method, "does not have a description"))
@@ -142831,7 +142831,7 @@

tern coverage - 94.64%

92 - 41x + 44x
  paste0("p-value (", meth_part, ")")
@@ -143223,42 +143223,42 @@

tern coverage - 94.64%

148 - 5x + 6x
  afun <- make_afun(
149 - 5x + 6x
    a_test_proportion_diff,
150 - 5x + 6x
    .stats = .stats,
151 - 5x + 6x
    .formats = .formats,
152 - 5x + 6x
    .labels = .labels,
153 - 5x + 6x
    .indent_mods = .indent_mods
@@ -143272,70 +143272,70 @@

tern coverage - 94.64%

155 - 5x + 6x
  analyze(
156 - 5x + 6x
    lyt,
157 - 5x + 6x
    vars,
158 - 5x + 6x
    afun = afun,
159 - 5x + 6x
    var_labels = var_labels,
160 - 5x + 6x
    na_str = na_str,
161 - 5x + 6x
    nested = nested,
162 - 5x + 6x
    extra_args = list(...),
163 - 5x + 6x
    show_labels = show_labels,
164 - 5x + 6x
    table_names = table_names
@@ -143489,21 +143489,21 @@

tern coverage - 94.64%

186 - 23x + 25x
  checkmate::assert_integer(c(ncol(tbl), nrow(tbl)), lower = 2, upper = 2)
187 - 23x + 25x
  tbl <- tbl[, c("TRUE", "FALSE")]
188 - 23x + 25x
  if (any(colSums(tbl) == 0)) {
@@ -143524,7 +143524,7 @@

tern coverage - 94.64%

191 - 21x + 23x
  stats::prop.test(tbl, correct = FALSE)$p.value
@@ -159986,6 +159986,1090 @@

tern coverage - 94.64%

+