diff --git a/main/coverage-report/index.html b/main/coverage-report/index.html index 5d6ee6d8c7..fe8e1c8274 100644 --- a/main/coverage-report/index.html +++ b/main/coverage-report/index.html @@ -107,8 +107,8 @@

tern coverage - 94.66%

-
- +
+
@@ -15141,21 +15141,21 @@

tern coverage - 94.66%

53 - 405x + 407x
  checkmate::assert_character(method_groups)
54 - 405x + 407x
  checkmate::assert_character(stats_in, null.ok = TRUE)
55 - 405x + 407x
  checkmate::assert_flag(add_pval)
@@ -15176,7 +15176,7 @@

tern coverage - 94.66%

58 - 405x + 407x
  if (any(method_groups == "analyze_vars")) {
@@ -15204,7 +15204,7 @@

tern coverage - 94.66%

62 - 405x + 407x
  type_tmp <- ifelse(any(grepl("counts", method_groups)), "counts", "numeric") # for pval checks
@@ -15225,7 +15225,7 @@

tern coverage - 94.66%

65 - 405x + 407x
  out <- NULL
@@ -15246,21 +15246,21 @@

tern coverage - 94.66%

68 - 405x + 407x
  for (mgi in method_groups) {
69 - 415x + 417x
    out_tmp <- if (mgi %in% names(tern_default_stats)) {
70 - 415x + 417x
      tern_default_stats[[mgi]]
@@ -15288,7 +15288,7 @@

tern coverage - 94.66%

74 - 415x + 417x
    out <- unique(c(out, out_tmp))
@@ -15316,7 +15316,7 @@

tern coverage - 94.66%

78 - 405x + 407x
  if (!is.null(stats_in) && any(grepl("^pval", stats_in))) {
@@ -15463,7 +15463,7 @@

tern coverage - 94.66%

99 - 402x + 404x
  if (isTRUE(add_pval)) {
@@ -15526,7 +15526,7 @@

tern coverage - 94.66%

108 - 402x + 404x
  if (!is.null(stats_in)) {
@@ -15561,7 +15561,7 @@

tern coverage - 94.66%

113 - 402x + 404x
  if (length(out) == 0) {
@@ -15617,7 +15617,7 @@

tern coverage - 94.66%

121 - 400x + 402x
  out
@@ -15834,7 +15834,7 @@

tern coverage - 94.66%

152 - 403x + 405x
  checkmate::assert_character(stats, min.len = 1)
@@ -15848,7 +15848,7 @@

tern coverage - 94.66%

154 - 403x + 405x
  if (checkmate::test_list(formats_in, null.ok = TRUE)) {
@@ -15876,7 +15876,7 @@

tern coverage - 94.66%

158 - 42x + 44x
    checkmate::assert_character(formats_in, null.ok = TRUE)
@@ -15904,7 +15904,7 @@

tern coverage - 94.66%

162 - 403x + 405x
  which_fmt <- match(stats, names(tern_default_formats))
@@ -15925,14 +15925,14 @@

tern coverage - 94.66%

165 - 403x + 405x
  ret <- vector("list", length = length(stats)) # Returning a list is simpler
166 - 403x + 405x
  ret[!is.na(which_fmt)] <- tern_default_formats[which_fmt[!is.na(which_fmt)]]
@@ -15946,7 +15946,7 @@

tern coverage - 94.66%

168 - 403x + 405x
  out <- setNames(ret, stats)
@@ -15967,7 +15967,7 @@

tern coverage - 94.66%

171 - 403x + 405x
  if (!is.null(formats_in)) {
@@ -15981,14 +15981,14 @@

tern coverage - 94.66%

173 - 44x + 46x
    common_names <- intersect(names(out), names(formats_in))
174 - 44x + 46x
    out[common_names] <- formats_in[common_names]
@@ -16009,7 +16009,7 @@

tern coverage - 94.66%

177 - 403x + 405x
  out
@@ -16212,14 +16212,14 @@

tern coverage - 94.66%

206 - 387x + 389x
  checkmate::assert_character(stats, min.len = 1, null.ok = TRUE)
207 - 387x + 389x
  checkmate::assert_character(row_nms, null.ok = TRUE)
@@ -16233,7 +16233,7 @@

tern coverage - 94.66%

209 - 387x + 389x
  if (checkmate::test_list(labels_in, null.ok = TRUE)) {
@@ -16261,7 +16261,7 @@

tern coverage - 94.66%

213 - 49x + 51x
    checkmate::assert_character(labels_in, null.ok = TRUE)
@@ -16282,7 +16282,7 @@

tern coverage - 94.66%

216 - 387x + 389x
  if (!is.null(row_nms)) {
@@ -16345,7 +16345,7 @@

tern coverage - 94.66%

225 - 344x + 346x
    which_lbl <- match(stats, names(tern_default_labels))
@@ -16359,14 +16359,14 @@

tern coverage - 94.66%

227 - 344x + 346x
    ret <- vector("character", length = length(stats)) # it needs to be a character vector
228 - 344x + 346x
    ret[!is.na(which_lbl)] <- tern_default_labels[which_lbl[!is.na(which_lbl)]]
@@ -16380,7 +16380,7 @@

tern coverage - 94.66%

230 - 344x + 346x
    out <- setNames(ret, stats)
@@ -16408,7 +16408,7 @@

tern coverage - 94.66%

234 - 387x + 389x
  if (!is.null(labels_in)) {
@@ -16422,14 +16422,14 @@

tern coverage - 94.66%

236 - 49x + 51x
    common_names <- intersect(names(out), names(labels_in))
237 - 49x + 51x
    out[common_names] <- labels_in[common_names]
@@ -16450,7 +16450,7 @@

tern coverage - 94.66%

240 - 387x + 389x
  out
@@ -16597,14 +16597,14 @@

tern coverage - 94.66%

261 - 367x + 369x
  checkmate::assert_character(stats, min.len = 1)
262 - 367x + 369x
  checkmate::assert_character(row_nms, null.ok = TRUE)
@@ -16618,14 +16618,14 @@

tern coverage - 94.66%

264 - 367x + 369x
  if (checkmate::test_list(indents_in, null.ok = TRUE)) {
265 - 336x + 338x
    checkmate::assert_list(indents_in, null.ok = TRUE)
@@ -16667,7 +16667,7 @@

tern coverage - 94.66%

271 - 367x + 369x
  if (is.null(names(indents_in)) && length(indents_in) == 1) {
@@ -16702,7 +16702,7 @@

tern coverage - 94.66%

276 - 359x + 361x
  if (!is.null(row_nms)) {
@@ -16765,14 +16765,14 @@

tern coverage - 94.66%

285 - 322x + 324x
    ret <- rep(0L, length(stats))
286 - 322x + 324x
    out <- setNames(ret, stats)
@@ -16800,7 +16800,7 @@

tern coverage - 94.66%

290 - 359x + 361x
  if (!is.null(indents_in)) {
@@ -16842,7 +16842,7 @@

tern coverage - 94.66%

296 - 359x + 361x
  out
@@ -17038,42 +17038,42 @@

tern coverage - 94.66%

324 - 18x + 20x
  if ("conf_level" %in% names(control)) {
325 - 18x + 20x
    labels_default <- sapply(
326 - 18x + 20x
      names(labels_default),
327 - 18x + 20x
      function(x) {
328 - 74x + 86x
        if (!x %in% names(labels_custom)) {
329 - 73x + 85x
          gsub(labels_default[[x]], pattern = "[0-9]+% CI", replacement = f_conf_level(control[["conf_level"]]))
@@ -17122,35 +17122,35 @@

tern coverage - 94.66%

336 - 18x + 20x
  if ("quantiles" %in% names(control) && "quantiles" %in% names(labels_default) &&
337 - 18x + 20x
    !"quantiles" %in% names(labels_custom)) { # nolint
338 - 14x + 16x
    labels_default["quantiles"] <- gsub(
339 - 14x + 16x
      "[0-9]+% and [0-9]+", paste0(control[["quantiles"]][1] * 100, "% and ", control[["quantiles"]][2] * 100, ""),
340 - 14x + 16x
      labels_default["quantiles"]
@@ -17171,14 +17171,14 @@

tern coverage - 94.66%

343 - 18x + 20x
  if ("test_mean" %in% names(control) && "mean_pval" %in% names(labels_default) &&
344 - 18x + 20x
    !"mean_pval" %in% names(labels_custom)) { # nolint
@@ -17220,7 +17220,7 @@

tern coverage - 94.66%

350 - 18x + 20x
  labels_default
@@ -27319,14 +27319,14 @@

tern coverage - 94.66%

570 - 366x + 368x
  is_auto_fmt <- vapply(.formats, function(ii) is.character(ii) && ii == "auto", logical(1))
571 - 366x + 368x
  if (any(is_auto_fmt)) {
@@ -27361,7 +27361,7 @@

tern coverage - 94.66%

576 - 366x + 368x
  .formats
@@ -44878,7 +44878,7 @@

tern coverage - 94.66%

456 - 230x + 232x
  getOption("tern_default_na_str", default = NA_character_)
@@ -70256,7 +70256,7 @@

tern coverage - 94.66%

15 - 1291x + 1297x
  checkmate::assert_numeric(x)
@@ -70270,7 +70270,7 @@

tern coverage - 94.66%

17 - 1291x + 1297x
  if (finite) {
@@ -70284,14 +70284,14 @@

tern coverage - 94.66%

19 - 1267x + 1273x
  } else if (na.rm) {
20 - 630x + 636x
    x <- x[!is.na(x)]
@@ -70312,21 +70312,21 @@

tern coverage - 94.66%

23 - 1291x + 1297x
  if (length(x) == 0) {
24 - 85x + 87x
    rval <- c(NA, NA)
25 - 85x + 87x
    mode(rval) <- typeof(x)
@@ -70340,7 +70340,7 @@

tern coverage - 94.66%

27 - 1206x + 1210x
    rval <- c(min(x, na.rm = FALSE), max(x, na.rm = FALSE))
@@ -70361,7 +70361,7 @@

tern coverage - 94.66%

30 - 1291x + 1297x
  return(rval)
@@ -70452,14 +70452,14 @@

tern coverage - 94.66%

43 - 2365x + 2379x
  assert_proportion_value(conf_level)
44 - 2363x + 2377x
  paste0(conf_level * 100, "% CI")
@@ -111931,35 +111931,35 @@

tern coverage - 94.66%

45 - 203x + 205x
  conf_type <- match.arg(conf_type)
46 - 202x + 204x
  checkmate::assert_numeric(quantiles, lower = 0, upper = 1, len = 2, unique = TRUE, sorted = TRUE)
47 - 201x + 203x
  nullo <- lapply(quantiles, assert_proportion_value)
48 - 201x + 203x
  assert_proportion_value(conf_level)
49 - 200x + 202x
  list(conf_level = conf_level, conf_type = conf_type, quantiles = quantiles)
@@ -136677,28 +136677,28 @@

tern coverage - 94.66%

54 - 206x + 208x
  checkmate::assert_string(.var)
55 - 206x + 208x
  assert_df_with_variables(df, list(tte = .var, is_event = is_event))
56 - 206x + 208x
  checkmate::assert_numeric(df[[.var]], min.len = 1, any.missing = FALSE)
57 - 206x + 208x
  checkmate::assert_logical(df[[is_event]], min.len = 1, any.missing = FALSE)
@@ -136712,21 +136712,21 @@

tern coverage - 94.66%

59 - 206x + 208x
  conf_type <- control$conf_type
60 - 206x + 208x
  conf_level <- control$conf_level
61 - 206x + 208x
  quantiles <- control$quantiles
@@ -136740,42 +136740,42 @@

tern coverage - 94.66%

63 - 206x + 208x
  formula <- stats::as.formula(paste0("survival::Surv(", .var, ", ", is_event, ") ~ 1"))
64 - 206x + 208x
  srv_fit <- survival::survfit(
65 - 206x + 208x
    formula = formula,
66 - 206x + 208x
    data = df,
67 - 206x + 208x
    conf.int = conf_level,
68 - 206x + 208x
    conf.type = conf_type
@@ -136789,63 +136789,63 @@

tern coverage - 94.66%

70 - 206x + 208x
  srv_tab <- summary(srv_fit, extend = TRUE)$table
71 - 206x + 208x
  srv_qt_tab <- stats::quantile(srv_fit, probs = quantiles)$quantile
72 - 206x + 208x
  range_censor <- range_noinf(df[[.var]][!df[[is_event]]], na.rm = TRUE)
73 - 206x + 208x
  range_event <- range_noinf(df[[.var]][df[[is_event]]], na.rm = TRUE)
74 - 206x + 208x
  range <- range_noinf(df[[.var]], na.rm = TRUE)
75 - 206x + 208x
  list(
76 - 206x + 208x
    median = formatters::with_label(unname(srv_tab["median"]), "Median"),
77 - 206x + 208x
    median_ci = formatters::with_label(
78 - 206x + 208x
      unname(srv_tab[paste0(srv_fit$conf.int, c("LCL", "UCL"))]), f_conf_level(conf_level)
@@ -136859,14 +136859,14 @@

tern coverage - 94.66%

80 - 206x + 208x
    quantiles = formatters::with_label(
81 - 206x + 208x
      unname(srv_qt_tab), paste0(quantiles[1] * 100, "% and ", quantiles[2] * 100, "%-ile")
@@ -136880,21 +136880,21 @@

tern coverage - 94.66%

83 - 206x + 208x
    range_censor = formatters::with_label(range_censor, "Range (censored)"),
84 - 206x + 208x
    range_event = formatters::with_label(range_event, "Range (event)"),
85 - 206x + 208x
    range = formatters::with_label(range, "Range")
@@ -137104,14 +137104,14 @@

tern coverage - 94.66%

115 - 12x + 14x
  x_stats <- s_surv_time(
116 - 12x + 14x
    df = df, .var = .var, is_event = is_event, control = control
@@ -137125,14 +137125,14 @@

tern coverage - 94.66%

118 - 12x + 14x
  rng_censor_lwr <- x_stats[["range_censor"]][1]
119 - 12x + 14x
  rng_censor_upr <- x_stats[["range_censor"]][2]
@@ -137153,35 +137153,35 @@

tern coverage - 94.66%

122 - 12x + 14x
  fmts <- c(median_ci = "(xx.x, xx.x)", quantiles = "xx.x, xx.x", range = "xx.x to xx.x")
123 - 12x + 14x
  lbls <- c(median_ci = "95% CI", range = "Range", range_censor = "Range (censored)", range_event = "Range (event)")
124 - 12x + 14x
  lbls_custom <- .labels
125 - 12x + 14x
  .formats <- c(.formats, fmts[setdiff(names(fmts), names(.formats))])
126 - 12x + 14x
  .labels <- c(.labels, lbls[setdiff(names(lbls), names(lbls_custom))])
@@ -137202,28 +137202,28 @@

tern coverage - 94.66%

129 - 12x + 14x
  .stats <- get_stats("surv_time", stats_in = .stats)
130 - 12x + 14x
  .formats <- get_formats_from_stats(.stats, .formats)
131 - 12x + 14x
  .labels <- get_labels_from_stats(.stats, .labels) %>% labels_use_control(control, lbls_custom)
132 - 12x + 14x
  .indent_mods <- get_indents_from_stats(.stats, .indent_mods)
@@ -137237,7 +137237,7 @@

tern coverage - 94.66%

134 - 12x + 14x
  x_stats <- x_stats[.stats]
@@ -137258,7 +137258,7 @@

tern coverage - 94.66%

137 - 12x + 14x
  .formats <- apply_auto_formatting(.formats, x_stats, .df_row, .var)
@@ -137272,37 +137272,37 @@

tern coverage - 94.66%

139 - 12x + 14x
  cell_fns <- setNames(vector("list", length = length(x_stats)), .labels)
140 - 12x + 14x
  if ("range" %in% names(x_stats) && ref_fn_censor) {
141 - 12x + 14x -
    if (x_stats[["range"]][1] == rng_censor_lwr && x_stats[["range"]][2] == rng_censor_upr) {
+
    if (identical(x_stats[["range"]][1], rng_censor_lwr) && identical(x_stats[["range"]][2], rng_censor_upr)) {
142 - 1x + 2x
      cell_fns[[.labels[["range"]]]] <- "Censored observations: range minimum & maximum"
143 - 11x + 12x -
    } else if (x_stats[["range"]][1] == rng_censor_lwr) {
+
    } else if (identical(x_stats[["range"]][1], rng_censor_lwr)) {
@@ -137314,9 +137314,9 @@

tern coverage - 94.66%

145 - 9x + 10x -
    } else if (x_stats[["range"]][2] == rng_censor_upr) {
+
    } else if (identical(x_stats[["range"]][2], rng_censor_upr)) {
@@ -137349,56 +137349,56 @@

tern coverage - 94.66%

150 - 12x + 14x
  in_rows(
151 - 12x + 14x
    .list = x_stats,
152 - 12x + 14x
    .formats = .formats,
153 - 12x + 14x
    .names = .labels,
154 - 12x + 14x
    .labels = .labels,
155 - 12x + 14x
    .indent_mods = .indent_mods,
156 - 12x + 14x
    .format_na_strs = na_str,
157 - 12x + 14x
    .cell_footnotes = cell_fns
@@ -170549,7 +170549,7 @@

tern coverage - 94.66%

22 - 2455x + 2457x
  x <- Filter(Negate(is.null), x)
@@ -170563,35 +170563,35 @@

tern coverage - 94.66%

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

tern coverage - 94.66%

31 - 2455x + 2457x
  if (isTRUE(res)) {
32 - 2450x + 2452x
    res <- checkmate::check_character(unlist(x), min.chars = 1)
@@ -170633,7 +170633,7 @@

tern coverage - 94.66%

34 - 2455x + 2457x
  return(res)
@@ -170696,14 +170696,14 @@

tern coverage - 94.66%

43 - 2172x + 2174x
  checkmate::assert_data_frame(df)
44 - 2170x + 2172x
  assert_list_of_variables(variables)
@@ -170724,14 +170724,14 @@

tern coverage - 94.66%

47 - 2168x + 2170x
  err_flag <- all(unlist(variables) %in% colnames(df))
48 - 2168x + 2170x
  checkmate::assert_flag(err_flag)
@@ -170745,7 +170745,7 @@

tern coverage - 94.66%

50 - 2168x + 2170x
  if (isFALSE(err_flag)) {
@@ -170808,7 +170808,7 @@

tern coverage - 94.66%

59 - 2163x + 2165x
  if (!is.null(na_level)) {
@@ -170892,7 +170892,7 @@

tern coverage - 94.66%

71 - 2162x + 2164x
  return(TRUE)
@@ -171487,35 +171487,35 @@

tern coverage - 94.66%

156 - 9840x + 9860x
  checkmate::assert_number(x, lower = 0, upper = 1)
157 - 9828x + 9848x
  checkmate::assert_flag(include_boundaries)
158 - 9828x + 9848x
  if (isFALSE(include_boundaries)) {
159 - 5298x + 5318x
    checkmate::assert_true(x > 0)
160 - 5296x + 5316x
    checkmate::assert_true(x < 1)