Running ‘spelling.R’ [0s/0s]
  Running ‘testthat.R’ [97s/131s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/tests.html
  > # * https://testthat.r-lib.org/reference/test_package.html#special-files
  > 
  > library(testthat)
  > library(ggsurvfit)
  Loading required package: ggplot2
  > 
  > test_check("ggsurvfit")
  Plotting outcome "death from cancer".
  Plotting outcome "death from cancer".
  Plotting outcome "death from cancer".
  Plotting outcome "death from cancer".
  Plotting outcome "death from cancer".
  Plotting outcome "death from cancer".
  Plotting outcome "death from cancer".
  Plotting outcome "death from cancer".
  Plotting outcome "death from cancer".
  Plotting outcome "death from cancer".
  Ignoring unknown labels:
  * fill : "Time from Surgery to Treatment"
  * linetype : "Time from Surgery to Treatment"
  Ignoring unknown labels:
  * linetype : "Time from Surgery to Treatment"
  Ignoring unknown labels:
  * linetype : "Time from Surgery to Treatment"
  Ignoring unknown labels:
  * fill : "cyl"
  * linetype : "cyl"
  ! `add_pvalue()` works with objects created with `survfit2()` or `tidycmprsk::cuminc()`.
  i `add_pvalue()` has been ignored.
  Plotting outcome "death from cancer".
  Plotting outcome "death from cancer".
  Plotting outcome "death from cancer".
  Plotting outcome "death from cancer".
  Plotting outcome "death from cancer".
  Plotting outcome "death from cancer".
  Plotting outcome "death from cancer".
  Plotting outcome "death from cancer".
  Plotting outcome "death from cancer".
  Plotting outcome "death from cancer".
  ! Setting start time to -9.83572895277207.
  i Specify `ggsurvfit::survfit2(start.time)` to override this default.
  Plotting outcome "death from cancer".
  Plotting outcome "death from cancer".
  Plotting outcome "death from cancer".
  Plotting outcome "death from cancer".
  Plotting outcome "death from cancer".
  Plotting outcome "death from cancer".
  Plotting outcome "death from cancer".
  Saving 7 x 7 in image
  Saving 7 x 7 in image
  [ FAIL 36 | WARN 0 | SKIP 17 | PASS 204 ]
  
  ══ Skipped tests (17) ══════════════════════════════════════════════════════════
  • On CRAN (17): 'test-add_censor_mark.R:15:3', 'test-add_censor_mark.R:48:3',
    'test-add_censor_mark.R:63:3', 'test-add_confidence_interval.R:20:3',
    'test-add_confidence_interval.R:64:3', 'test-add_confidence_interval.R:85:3',
    'test-add_pvalue.R:47:3', 'test-add_quantile.R:78:3',
    'test-add_quantile.R:160:3', 'test-add_quantile.R:174:3',
    'test-add_quantile.R:205:3', 'test-ggcuminc.R:36:3', 'test-ggcuminc.R:63:3',
    'test-ggsurvfit.R:10:3', 'test-ggsurvfit_options.R:45:3',
    'test-stat_stepribbon.R:27:3', 'test-tidy_survfit.R:211:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure ('test-add_risktable.R:12:3'): add_risktable() works with ggsurvfit() ──
  `lst_survfit2_risktable %>% lapply(function(x) print(x))` threw an unexpected error.
  Message: argument "risktable_height" is missing, with no default
  Class:   getvarError/missingArgError/error/condition
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test-add_risktable.R:12:3
    2. │ └─testthat:::expect_condition_matching(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─lst_survfit2_risktable %>% lapply(function(x) print(x))
    8. └─base::lapply(., function(x) print(x))
    9.   └─ggsurvfit (local) FUN(X[[i]], ...)
   10.     ├─base::print(x) at test-add_risktable.R:14:14
   11.     └─ggsurvfit:::print.ggsurvfit(x)
   12.       └─ggsurvfit::ggsurvfit_build(x, combine_plots = TRUE)
   13.         ├─rlang::inject(...)
   14.         └─ggsurvfit:::.construct_risktable(...)
  ── Failure ('test-add_risktable.R:19:3'): add_risktable() works with ggsurvfit() ──
  ``%>%`(...)` threw an unexpected error.
  Message: argument "risktable_height" is missing, with no default
  Class:   getvarError/missingArgError/error/condition
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test-add_risktable.R:19:3
    2. │ └─testthat:::expect_condition_matching(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─list(sf1, sf2, sf3) %>% ...
    8. ├─base::lapply(...)
    9. │ └─ggsurvfit (local) FUN(X[[i]], ...)
   10. │   └─... %>% print() at test-add_risktable.R:23:11
   11. ├─base::print(.)
   12. └─ggsurvfit:::print.ggsurvfit(.)
   13.   └─ggsurvfit::ggsurvfit_build(x, combine_plots = TRUE)
   14.     ├─rlang::inject(...)
   15.     └─ggsurvfit:::.construct_risktable(...)
  ── Failure ('test-add_risktable.R:31:3'): add_risktable() works with ggsurvfit() ──
  ``%>%`(...)` threw an unexpected error.
  Message: argument "risktable_height" is missing, with no default
  Class:   getvarError/missingArgError/error/condition
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test-add_risktable.R:31:3
    2. │ └─testthat:::expect_condition_matching(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─list(sf1, sf2, sf3) %>% ...
    8. ├─base::lapply(...)
    9. │ └─ggsurvfit (local) FUN(X[[i]], ...)
   10. │   └─... %>% print() at test-add_risktable.R:35:11
   11. ├─base::print(.)
   12. └─ggsurvfit:::print.ggsurvfit(.)
   13.   └─ggsurvfit::ggsurvfit_build(x, combine_plots = TRUE)
   14.     ├─rlang::inject(...)
   15.     └─ggsurvfit:::.construct_risktable(...)
  ── Failure ('test-add_risktable.R:43:3'): add_risktable() works with ggsurvfit() ──
  ``%>%`(...)` threw an unexpected error.
  Message: argument "risktable_height" is missing, with no default
  Class:   getvarError/missingArgError/error/condition
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test-add_risktable.R:43:3
    2. │ └─testthat:::expect_condition_matching(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─list(sf2, sf3) %>% ...
    8. ├─base::lapply(...)
    9. │ └─ggsurvfit (local) FUN(X[[i]], ...)
   10. │   └─... %>% print() at test-add_risktable.R:45:14
   11. ├─base::print(.)
   12. └─ggsurvfit:::print.ggsurvfit(.)
   13.   └─ggsurvfit::ggsurvfit_build(x, combine_plots = TRUE)
   14.     ├─rlang::inject(...)
   15.     └─ggsurvfit:::.construct_risktable(...)
  ── Failure ('test-add_risktable.R:49:3'): add_risktable() works with ggsurvfit() ──
  ``%>%`(...)` threw an unexpected error.
  Message: argument "risktable_height" is missing, with no default
  Class:   getvarError/missingArgError/error/condition
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test-add_risktable.R:49:3
    2. │ └─testthat:::expect_condition_matching(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─list(sf2, sf3) %>% ...
    8. ├─base::lapply(...)
    9. │ └─ggsurvfit (local) FUN(X[[i]], ...)
   10. │   └─... %>% print() at test-add_risktable.R:51:14
   11. ├─base::print(.)
   12. └─ggsurvfit:::print.ggsurvfit(.)
   13.   └─ggsurvfit::ggsurvfit_build(x, combine_plots = TRUE)
   14.     ├─rlang::inject(...)
   15.     └─ggsurvfit:::.construct_risktable(...)
  ── Failure ('test-add_risktable.R:63:3'): add_risktable() works with ggsurvfit() ──
  `print(risktable_overall1)` threw an unexpected error.
  Message: argument "risktable_height" is missing, with no default
  Class:   getvarError/missingArgError/error/condition
  Backtrace:
       ▆
    1. ├─testthat::expect_error(print(risktable_overall1), NA) at test-add_risktable.R:63:3
    2. │ └─testthat:::expect_condition_matching(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─base::print(risktable_overall1)
    8. └─ggsurvfit:::print.ggsurvfit(risktable_overall1)
    9.   └─ggsurvfit::ggsurvfit_build(x, combine_plots = TRUE)
   10.     ├─rlang::inject(...)
   11.     └─ggsurvfit:::.construct_risktable(...)
  ── Failure ('test-add_risktable.R:73:3'): add_risktable() works with ggsurvfit() ──
  `print(risktable_overall2)` threw an unexpected error.
  Message: argument "risktable_height" is missing, with no default
  Class:   getvarError/missingArgError/error/condition
  Backtrace:
       ▆
    1. ├─testthat::expect_error(print(risktable_overall2), NA) at test-add_risktable.R:73:3
    2. │ └─testthat:::expect_condition_matching(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─base::print(risktable_overall2)
    8. └─ggsurvfit:::print.ggsurvfit(risktable_overall2)
    9.   └─ggsurvfit::ggsurvfit_build(x, combine_plots = TRUE)
   10.     ├─rlang::inject(...)
   11.     └─ggsurvfit:::.construct_risktable(...)
  ── Failure ('test-add_risktable.R:90:3'): add_risktable() works with ggsurvfit() ──
  `print(risktable_with_weights)` threw an unexpected error.
  Message: argument "risktable_height" is missing, with no default
  Class:   getvarError/missingArgError/error/condition
  Backtrace:
       ▆
    1. ├─testthat::expect_error(print(risktable_with_weights), NA) at test-add_risktable.R:90:3
    2. │ └─testthat:::expect_condition_matching(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─base::print(risktable_with_weights)
    8. └─ggsurvfit:::print.ggsurvfit(risktable_with_weights)
    9.   └─ggsurvfit::ggsurvfit_build(x, combine_plots = TRUE)
   10.     ├─rlang::inject(...)
   11.     └─ggsurvfit:::.construct_risktable(...)
  ── Failure ('test-add_risktable.R:98:3'): add_risktable() works with ggsurvfit() ──
  `print(`sf1-risktable-height`)` threw an unexpected error.
  Message: argument "risktable_height" is missing, with no default
  Class:   getvarError/missingArgError/error/condition
  Backtrace:
       ▆
    1. ├─testthat::expect_error(print(`sf1-risktable-height`), NA) at test-add_risktable.R:98:3
    2. │ └─testthat:::expect_condition_matching(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─base::print(`sf1-risktable-height`)
    8. └─ggsurvfit:::print.ggsurvfit(`sf1-risktable-height`)
    9.   └─ggsurvfit::ggsurvfit_build(x, combine_plots = TRUE)
   10.     ├─rlang::inject(...)
   11.     └─ggsurvfit:::.construct_risktable(...)
  ── Error ('test-add_risktable.R:103:3'): add_risktable() works with ggsurvfit() ──
  <getvarError/missingArgError/error/condition>
  Error in `.construct_risktable(x, geom_blank.times = NULL, geom_blank.risktable_stats = c("{n.risk}", 
  "{cum.event}"), geom_blank.stats_label = NULL, geom_blank.combine_groups = FALSE, 
      geom_blank.risktable_group = "auto", geom_blank.risktable_height = NULL, 
      geom_blank.theme = list(structure(list(line = <object>, rect = <object>, 
          text = <object>, title = <object>, point = <object>, 
          polygon = <object>, geom = <object>, spacing = structure(5.5, unit = 8L, class = c("simpleUnit", 
          "unit", "unit_v2")), margins = structure(c(5.5, 5.5, 
          5.5, 5.5), class = c("ggplot2::margin", "simpleUnit", 
          "unit", "unit_v2", "S7_object"), S7_class = structure(function (t = 0, 
              r = 0, b = 0, l = 0, unit = "pt", ...) 
          {
              warn_dots_empty()
              lens <- c(length(t), length(r), length(b), length(l))
              if (any(lens != 1)) {
                  incorrect <- c("t", "r", "b", "l")[lens != 1]
                  s <- if (length(incorrect) > 1) 
                    "s"
                  else ""
                  cli::cli_warn(c("In {.fn margin}, the argument{s} {.and {.arg {incorrect}}} should \\\n        have length 1, not length {.and {lens[lens != 1]}}.", 
                    i = "Argument{s} get(s) truncated to length 1."))
                  t <- t[1]
                  r <- r[1]
                  b <- b[1]
                  l <- l[1]
              }
              u <- unit(c(t, r, b, l), unit)
              S7::new_object(u)
          }, name = "margin", parent = structure(list(class = c("simpleUnit", 
          "unit", "unit_v2"), constructor = function (.data) 
          {
              stop(sprintf("S3 class <%s> doesn't have a constructor", 
                  class[[1]]), call. = FALSE)
          }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(), abstract = FALSE, constructor = function (t = 0, 
              r = 0, b = 0, l = 0, unit = "pt", ...) 
          {
              warn_dots_empty()
              lens <- c(length(t), length(r), length(b), length(l))
              if (any(lens != 1)) {
                  incorrect <- c("t", "r", "b", "l")[lens != 1]
                  s <- if (length(incorrect) > 1) 
                    "s"
                  else ""
                  cli::cli_warn(c("In {.fn margin}, the argument{s} {.and {.arg {incorrect}}} should \\\n        have length 1, not length {.and {lens[lens != 1]}}.", 
                    i = "Argument{s} get(s) truncated to length 1."))
                  t <- t[1]
                  r <- r[1]
                  b <- b[1]
                  l <- l[1]
              }
              u <- unit(c(t, r, b, l), unit)
              S7::new_object(u)
          }, class = c("S7_class", "S7_object")), unit = 8L), aspect.ratio = NULL, 
          axis.title = NULL, axis.title.x = <object>, axis.title.x.top = <object>, 
          axis.title.x.bottom = NULL, axis.title.y = <object>, 
          axis.title.y.left = NULL, axis.title.y.right = <object>, 
          axis.text = <object>, axis.text.x = <object>, axis.text.x.top = <object>, 
          axis.text.x.bottom = NULL, axis.text.y = <object>, axis.text.y.left = NULL, 
          axis.text.y.right = <object>, axis.text.theta = NULL, 
          axis.text.r = <object>, axis.ticks = <object>, axis.ticks.x = NULL, 
          axis.ticks.x.top = NULL, axis.ticks.x.bottom = NULL, 
          axis.ticks.y = NULL, axis.ticks.y.left = NULL, axis.ticks.y.right = NULL, 
          axis.ticks.theta = NULL, axis.ticks.r = NULL, axis.minor.ticks.x.top = NULL, 
          axis.minor.ticks.x.bottom = NULL, axis.minor.ticks.y.left = NULL, 
          axis.minor.ticks.y.right = NULL, axis.minor.ticks.theta = NULL, 
          axis.minor.ticks.r = NULL, axis.ticks.length = structure(0.5, class = "rel"), 
          axis.ticks.length.x = NULL, axis.ticks.length.x.top = NULL, 
          axis.ticks.length.x.bottom = NULL, axis.ticks.length.y = NULL, 
          axis.ticks.length.y.left = NULL, axis.ticks.length.y.right = NULL, 
          axis.ticks.length.theta = NULL, axis.ticks.length.r = NULL, 
          axis.minor.ticks.length = structure(0.75, class = "rel"), 
          axis.minor.ticks.length.x = NULL, axis.minor.ticks.length.x.top = NULL, 
          axis.minor.ticks.length.x.bottom = NULL, axis.minor.ticks.length.y = NULL, 
          axis.minor.ticks.length.y.left = NULL, axis.minor.ticks.length.y.right = NULL, 
          axis.minor.ticks.length.theta = NULL, axis.minor.ticks.length.r = NULL, 
          axis.line = <object>, axis.line.x = NULL, axis.line.x.top = NULL, 
          axis.line.x.bottom = NULL, axis.line.y = NULL, axis.line.y.left = NULL, 
          axis.line.y.right = NULL, axis.line.theta = NULL, axis.line.r = NULL, 
          legend.background = <object>, legend.margin = NULL, legend.spacing = structure(2, class = "rel"), 
          legend.spacing.x = NULL, legend.spacing.y = NULL, legend.key = NULL, 
          legend.key.size = structure(1.2, unit = 3L, class = c("simpleUnit", 
          "unit", "unit_v2")), legend.key.height = NULL, legend.key.width = NULL, 
          legend.key.spacing = NULL, legend.key.spacing.x = NULL, 
          legend.key.spacing.y = NULL, legend.key.justification = NULL, 
          legend.frame = NULL, legend.ticks = NULL, legend.ticks.length = structure(0.2, class = "rel"), 
          legend.axis.line = NULL, legend.text = <object>, legend.text.position = NULL, 
          legend.title = <object>, legend.title.position = NULL, 
          legend.position = "right", legend.position.inside = NULL, 
          legend.direction = NULL, legend.byrow = NULL, legend.justification = "center", 
          legend.justification.top = NULL, legend.justification.bottom = NULL, 
          legend.justification.left = NULL, legend.justification.right = NULL, 
          legend.justification.inside = NULL, legend.location = NULL, 
          legend.box = NULL, legend.box.just = NULL, legend.box.margin = structure(c(0, 
          0, 0, 0), class = c("ggplot2::margin", "simpleUnit", 
          "unit", "unit_v2", "S7_object"), S7_class = structure(function (t = 0, 
              r = 0, b = 0, l = 0, unit = "pt", ...) 
          {
              warn_dots_empty()
              lens <- c(length(t), length(r), length(b), length(l))
              if (any(lens != 1)) {
                  incorrect <- c("t", "r", "b", "l")[lens != 1]
                  s <- if (length(incorrect) > 1) 
                    "s"
                  else ""
                  cli::cli_warn(c("In {.fn margin}, the argument{s} {.and {.arg {incorrect}}} should \\\n        have length 1, not length {.and {lens[lens != 1]}}.", 
                    i = "Argument{s} get(s) truncated to length 1."))
                  t <- t[1]
                  r <- r[1]
                  b <- b[1]
                  l <- l[1]
              }
              u <- unit(c(t, r, b, l), unit)
              S7::new_object(u)
          }, name = "margin", parent = structure(list(class = c("simpleUnit", 
          "unit", "unit_v2"), constructor = function (.data) 
          {
              stop(sprintf("S3 class <%s> doesn't have a constructor", 
                  class[[1]]), call. = FALSE)
          }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(), abstract = FALSE, constructor = function (t = 0, 
              r = 0, b = 0, l = 0, unit = "pt", ...) 
          {
              warn_dots_empty()
              lens <- c(length(t), length(r), length(b), length(l))
              if (any(lens != 1)) {
                  incorrect <- c("t", "r", "b", "l")[lens != 1]
                  s <- if (length(incorrect) > 1) 
                    "s"
                  else ""
                  cli::cli_warn(c("In {.fn margin}, the argument{s} {.and {.arg {incorrect}}} should \\\n        have length 1, not length {.and {lens[lens != 1]}}.", 
                    i = "Argument{s} get(s) truncated to length 1."))
                  t <- t[1]
                  r <- r[1]
                  b <- b[1]
                  l <- l[1]
              }
              u <- unit(c(t, r, b, l), unit)
              S7::new_object(u)
          }, class = c("S7_class", "S7_object")), unit = 8L), legend.box.background = <object>, 
          legend.box.spacing = structure(2, class = "rel"), panel.background = <object>, 
          panel.border = <object>, panel.spacing = NULL, panel.spacing.x = NULL, 
          panel.spacing.y = NULL, panel.grid = <object>, panel.grid.major = NULL, 
          panel.grid.minor = <object>, panel.grid.major.x = NULL, 
          panel.grid.major.y = NULL, panel.grid.minor.x = NULL, 
          panel.grid.minor.y = NULL, panel.ontop = FALSE, panel.widths = NULL, 
          panel.heights = NULL, plot.background = <object>, plot.title = <object>, 
          plot.title.position = "panel", plot.subtitle = <object>, 
          plot.caption = <object>, plot.caption.position = "panel", 
          plot.tag = <object>, plot.tag.position = "topleft", plot.tag.location = NULL, 
          plot.margin = NULL, strip.background = <object>, strip.background.x = NULL, 
          strip.background.y = NULL, strip.clip = "on", strip.placement = "inside", 
          strip.text = <object>, strip.text.x = NULL, strip.text.x.bottom = NULL, 
          strip.text.x.top = NULL, strip.text.y = <object>, strip.text.y.left = <object>, 
          strip.text.y.right = NULL, strip.switch.pad.grid = structure(2.75, unit = 8L, class = c("simpleUnit", 
          "unit", "unit_v2")), strip.switch.pad.wrap = structure(2.75, unit = 8L, class = c("simpleUnit", 
          "unit", "unit_v2"))), class = c("theme", "ggplot2::theme", 
      "gg", "S7_object"), S7_class = structure(function (elements = list(), 
          ..., complete = FALSE, validate = TRUE) 
      {
          warn_dots_empty()
          S7::new_object(elements, complete = complete, validate = validate)
      }, name = "theme", parent = structure(list(class = "gg", 
          constructor = function (.data) 
          {
              stop(sprintf("S3 class <%s> doesn't have a constructor", 
                  class[[1]]), call. = FALSE)
          }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(
          complete = structure(list(name = "complete", class = structure(list(
              class = "logical", constructor_name = "logical", 
              constructor = function (.data = logical(0)) 
              .data, validator = function (object) 
              {
                  if (base_class(object) != name) {
                    sprintf("Underlying data must be <%s> not <%s>", 
                      name, base_class(object))
                  }
              }), class = "S7_base_class"), getter = NULL, setter = NULL, 
              validator = NULL, default = NULL), class = "S7_property"), 
          validate = structure(list(name = "validate", class = structure(list(
              class = "logical", constructor_name = "logical", 
              constructor = function (.data = logical(0)) 
              .data, validator = function (object) 
              {
                  if (base_class(object) != name) {
                    sprintf("Underlying data must be <%s> not <%s>", 
                      name, base_class(object))
                  }
              }), class = "S7_base_class"), getter = NULL, setter = NULL, 
              validator = NULL, default = NULL), class = "S7_property")), abstract = FALSE, constructor = function (elements = list(), 
          ..., complete = FALSE, validate = TRUE) 
      {
          warn_dots_empty()
          S7::new_object(elements, complete = complete, validate = validate)
      }, class = c("S7_class", "S7_object")), complete = TRUE, validate = TRUE), 
          structure(list(axis.title.x = <object>, axis.text.x = <object>, 
              axis.text.y = <object>, axis.ticks = <object>, axis.line = <object>, 
              legend.position = "none", panel.border = <object>, 
              panel.grid.major = <object>, panel.grid.minor = <object>, 
              plot.title = <object>, plot.margin = structure(c(0, 
              5.5, 0, 5.5), unit = 8L, class = c("simpleUnit", 
              "unit", "unit_v2"))), class = c("theme", "ggplot2::theme", 
          "gg", "S7_object"), S7_class = structure(function (elements = list(), 
              ..., complete = FALSE, validate = TRUE) 
          {
              warn_dots_empty()
              S7::new_object(elements, complete = complete, validate = validate)
          }, name = "theme", parent = structure(list(class = "gg", 
              constructor = function (.data) 
              {
                  stop(sprintf("S3 class <%s> doesn't have a constructor", 
                    class[[1]]), call. = FALSE)
              }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(
              complete = structure(list(name = "complete", class = structure(list(
                  class = "logical", constructor_name = "logical", 
                  constructor = function (.data = logical(0)) 
                  .data, validator = function (object) 
                  {
                    if (base_class(object) != name) {
                      sprintf("Underlying data must be <%s> not <%s>", 
                        name, base_class(object))
                    }
                  }), class = "S7_base_class"), getter = NULL, 
                  setter = NULL, validator = NULL, default = NULL), class = "S7_property"), 
              validate = structure(list(name = "validate", class = structure(list(
                  class = "logical", constructor_name = "logical", 
                  constructor = function (.data = logical(0)) 
                  .data, validator = function (object) 
                  {
                    if (base_class(object) != name) {
                      sprintf("Underlying data must be <%s> not <%s>", 
                        name, base_class(object))
                    }
                  }), class = "S7_base_class"), getter = NULL, 
                  setter = NULL, validator = NULL, default = NULL), class = "S7_property")), abstract = FALSE, constructor = function (elements = list(), 
              ..., complete = FALSE, validate = TRUE) 
          {
              warn_dots_empty()
              S7::new_object(elements, complete = complete, validate = validate)
          }, class = c("S7_class", "S7_object")), complete = FALSE, validate = TRUE), 
          structure(list(x = NULL), class = c("ggplot2::labels", 
          "gg", "S7_object"), S7_class = structure(function (labels = list(), 
              ...) 
          {
              warn_dots_empty()
              S7::new_object(labels)
          }, name = "labels", parent = structure(list(class = "gg", 
              constructor = function (.data) 
              {
                  stop(sprintf("S3 class <%s> doesn't have a constructor", 
                    class[[1]]), call. = FALSE)
              }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(), abstract = FALSE, constructor = function (labels = list(), 
              ...) 
          {
              warn_dots_empty()
              S7::new_object(labels)
          }, validator = function (self) 
          {
              if (!is.list(self)) {
                  return("labels must be a list.")
              }
              if (!is_named2(self)) {
                  return("every label must be named.")
              }
              dups <- unique(names(self)[duplicated(names(self))])
              if (length(dups) > 0) {
                  dups <- oxford_comma(dups, final = "and")
                  return(paste0("labels cannot contain duplicate names (", 
                    dups, ")."))
              }
              return(NULL)
          }, class = c("S7_class", "S7_object"))), structure(list(
              y = NULL), class = c("ggplot2::labels", "gg", "S7_object"
          ), S7_class = structure(function (labels = list(), ...) 
          {
              warn_dots_empty()
              S7::new_object(labels)
          }, name = "labels", parent = structure(list(class = "gg", 
              constructor = function (.data) 
              {
                  stop(sprintf("S3 class <%s> doesn't have a constructor", 
                    class[[1]]), call. = FALSE)
              }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(), abstract = FALSE, constructor = function (labels = list(), 
              ...) 
          {
              warn_dots_empty()
              S7::new_object(labels)
          }, validator = function (self) 
          {
              if (!is.list(self)) {
                  return("labels must be a list.")
              }
              if (!is_named2(self)) {
                  return("every label must be named.")
              }
              dups <- unique(names(self)[duplicated(names(self))])
              if (length(dups) > 0) {
                  dups <- oxford_comma(dups, final = "and")
                  return(paste0("labels cannot contain duplicate names (", 
                    dups, ")."))
              }
              return(NULL)
          }, class = c("S7_class", "S7_object")))), geom_blank.size = 3.5, 
      combine_plots = combine_plots, risktable_symbol_args = risktable_symbol_args)`: argument "risktable_height" is missing, with no default
  Backtrace:
      ▆
   1. └─vdiffr::expect_doppelganger("sf1-risktable", lst_survfit2_risktable[[1]]) at test-add_risktable.R:103:3
   2.   └─vdiffr (local) writer(fig, testcase, title)
   3.     ├─vdiffr:::print_plot(plot, title)
   4.     └─vdiffr:::print_plot.ggplot(plot, title)
   5.       ├─base::print(p)
   6.       └─ggsurvfit:::print.ggsurvfit(p)
   7.         └─ggsurvfit::ggsurvfit_build(x, combine_plots = TRUE)
   8.           ├─rlang::inject(...)
   9.           └─ggsurvfit:::.construct_risktable(...)
  ── Failure ('test-add_risktable.R:143:3'): add_risktable() works with ggcuminc() ──
  `lst_cuminc_risktable %>% lapply(function(x) print(x))` threw an unexpected error.
  Message: argument "risktable_height" is missing, with no default
  Class:   getvarError/missingArgError/error/condition
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test-add_risktable.R:143:3
    2. │ └─testthat:::expect_condition_matching(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─lst_cuminc_risktable %>% lapply(function(x) print(x))
    8. └─base::lapply(., function(x) print(x))
    9.   └─ggsurvfit (local) FUN(X[[i]], ...)
   10.     ├─base::print(x) at test-add_risktable.R:145:14
   11.     └─ggsurvfit:::print.ggcuminc(x)
   12.       └─ggsurvfit::ggsurvfit_build(x, combine_plots = TRUE)
   13.         ├─rlang::inject(...)
   14.         └─ggsurvfit:::.construct_risktable(...)
  ── Failure ('test-add_risktable.R:149:3'): add_risktable() works with ggcuminc() ──
  ``%>%`(...)` threw an unexpected error.
  Message: argument "risktable_height" is missing, with no default
  Class:   getvarError/missingArgError/error/condition
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test-add_risktable.R:149:3
    2. │ └─testthat:::expect_condition_matching(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─list(cuminc1, cuminc2, cuminc3) %>% ...
    8. ├─base::lapply(...)
    9. │ └─ggsurvfit (local) FUN(X[[i]], ...)
   10. │   └─... %>% print() at test-add_risktable.R:153:11
   11. ├─base::print(.)
   12. └─ggsurvfit:::print.ggcuminc(.)
   13.   └─ggsurvfit::ggsurvfit_build(x, combine_plots = TRUE)
   14.     ├─rlang::inject(...)
   15.     └─ggsurvfit:::.construct_risktable(...)
  ── Failure ('test-add_risktable.R:161:3'): add_risktable() works with ggcuminc() ──
  ``%>%`(...)` threw an unexpected error.
  Message: argument "risktable_height" is missing, with no default
  Class:   getvarError/missingArgError/error/condition
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test-add_risktable.R:161:3
    2. │ └─testthat:::expect_condition_matching(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─list(cuminc2, cuminc3) %>% ...
    8. ├─base::lapply(...)
    9. │ └─ggsurvfit (local) FUN(X[[i]], ...)
   10. │   └─... %>% print() at test-add_risktable.R:163:14
   11. ├─base::print(.)
   12. └─ggsurvfit:::print.ggcuminc(.)
   13.   └─ggsurvfit::ggsurvfit_build(x, combine_plots = TRUE)
   14.     ├─rlang::inject(...)
   15.     └─ggsurvfit:::.construct_risktable(...)
  ── Failure ('test-add_risktable.R:167:3'): add_risktable() works with ggcuminc() ──
  ``%>%`(...)` threw an unexpected error.
  Message: argument "risktable_height" is missing, with no default
  Class:   getvarError/missingArgError/error/condition
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test-add_risktable.R:167:3
    2. │ └─testthat:::expect_condition_matching(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─list(cuminc2, cuminc3) %>% ...
    8. ├─base::lapply(...)
    9. │ └─ggsurvfit (local) FUN(X[[i]], ...)
   10. │   └─(ggcuminc(x) + add_risktable(combine_groups = TRUE)) %>% ... at test-add_risktable.R:169:14
   11. ├─base::print(.)
   12. └─ggsurvfit:::print.ggcuminc(.)
   13.   └─ggsurvfit::ggsurvfit_build(x, combine_plots = TRUE)
   14.     ├─rlang::inject(...)
   15.     └─ggsurvfit:::.construct_risktable(...)
  ── Error ('test-add_risktable.R:174:3'): add_risktable() works with ggcuminc() ──
  <getvarError/missingArgError/error/condition>
  Error in `.construct_risktable(x, geom_blank.times = NULL, geom_blank.risktable_stats = c("{n.risk}", 
  "{cum.event}"), geom_blank.stats_label = NULL, geom_blank.combine_groups = FALSE, 
      geom_blank.risktable_group = "auto", geom_blank.risktable_height = NULL, 
      geom_blank.theme = list(structure(list(line = <object>, rect = <object>, 
          text = <object>, title = <object>, point = <object>, 
          polygon = <object>, geom = <object>, spacing = structure(5.5, unit = 8L, class = c("simpleUnit", 
          "unit", "unit_v2")), margins = structure(c(5.5, 5.5, 
          5.5, 5.5), class = c("ggplot2::margin", "simpleUnit", 
          "unit", "unit_v2", "S7_object"), S7_class = structure(function (t = 0, 
              r = 0, b = 0, l = 0, unit = "pt", ...) 
          {
              warn_dots_empty()
              lens <- c(length(t), length(r), length(b), length(l))
              if (any(lens != 1)) {
                  incorrect <- c("t", "r", "b", "l")[lens != 1]
                  s <- if (length(incorrect) > 1) 
                    "s"
                  else ""
                  cli::cli_warn(c("In {.fn margin}, the argument{s} {.and {.arg {incorrect}}} should \\\n        have length 1, not length {.and {lens[lens != 1]}}.", 
                    i = "Argument{s} get(s) truncated to length 1."))
                  t <- t[1]
                  r <- r[1]
                  b <- b[1]
                  l <- l[1]
              }
              u <- unit(c(t, r, b, l), unit)
              S7::new_object(u)
          }, name = "margin", parent = structure(list(class = c("simpleUnit", 
          "unit", "unit_v2"), constructor = function (.data) 
          {
              stop(sprintf("S3 class <%s> doesn't have a constructor", 
                  class[[1]]), call. = FALSE)
          }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(), abstract = FALSE, constructor = function (t = 0, 
              r = 0, b = 0, l = 0, unit = "pt", ...) 
          {
              warn_dots_empty()
              lens <- c(length(t), length(r), length(b), length(l))
              if (any(lens != 1)) {
                  incorrect <- c("t", "r", "b", "l")[lens != 1]
                  s <- if (length(incorrect) > 1) 
                    "s"
                  else ""
                  cli::cli_warn(c("In {.fn margin}, the argument{s} {.and {.arg {incorrect}}} should \\\n        have length 1, not length {.and {lens[lens != 1]}}.", 
                    i = "Argument{s} get(s) truncated to length 1."))
                  t <- t[1]
                  r <- r[1]
                  b <- b[1]
                  l <- l[1]
              }
              u <- unit(c(t, r, b, l), unit)
              S7::new_object(u)
          }, class = c("S7_class", "S7_object")), unit = 8L), aspect.ratio = NULL, 
          axis.title = NULL, axis.title.x = <object>, axis.title.x.top = <object>, 
          axis.title.x.bottom = NULL, axis.title.y = <object>, 
          axis.title.y.left = NULL, axis.title.y.right = <object>, 
          axis.text = <object>, axis.text.x = <object>, axis.text.x.top = <object>, 
          axis.text.x.bottom = NULL, axis.text.y = <object>, axis.text.y.left = NULL, 
          axis.text.y.right = <object>, axis.text.theta = NULL, 
          axis.text.r = <object>, axis.ticks = <object>, axis.ticks.x = NULL, 
          axis.ticks.x.top = NULL, axis.ticks.x.bottom = NULL, 
          axis.ticks.y = NULL, axis.ticks.y.left = NULL, axis.ticks.y.right = NULL, 
          axis.ticks.theta = NULL, axis.ticks.r = NULL, axis.minor.ticks.x.top = NULL, 
          axis.minor.ticks.x.bottom = NULL, axis.minor.ticks.y.left = NULL, 
          axis.minor.ticks.y.right = NULL, axis.minor.ticks.theta = NULL, 
          axis.minor.ticks.r = NULL, axis.ticks.length = structure(0.5, class = "rel"), 
          axis.ticks.length.x = NULL, axis.ticks.length.x.top = NULL, 
          axis.ticks.length.x.bottom = NULL, axis.ticks.length.y = NULL, 
          axis.ticks.length.y.left = NULL, axis.ticks.length.y.right = NULL, 
          axis.ticks.length.theta = NULL, axis.ticks.length.r = NULL, 
          axis.minor.ticks.length = structure(0.75, class = "rel"), 
          axis.minor.ticks.length.x = NULL, axis.minor.ticks.length.x.top = NULL, 
          axis.minor.ticks.length.x.bottom = NULL, axis.minor.ticks.length.y = NULL, 
          axis.minor.ticks.length.y.left = NULL, axis.minor.ticks.length.y.right = NULL, 
          axis.minor.ticks.length.theta = NULL, axis.minor.ticks.length.r = NULL, 
          axis.line = <object>, axis.line.x = NULL, axis.line.x.top = NULL, 
          axis.line.x.bottom = NULL, axis.line.y = NULL, axis.line.y.left = NULL, 
          axis.line.y.right = NULL, axis.line.theta = NULL, axis.line.r = NULL, 
          legend.background = <object>, legend.margin = NULL, legend.spacing = structure(2, class = "rel"), 
          legend.spacing.x = NULL, legend.spacing.y = NULL, legend.key = NULL, 
          legend.key.size = structure(1.2, unit = 3L, class = c("simpleUnit", 
          "unit", "unit_v2")), legend.key.height = NULL, legend.key.width = NULL, 
          legend.key.spacing = NULL, legend.key.spacing.x = NULL, 
          legend.key.spacing.y = NULL, legend.key.justification = NULL, 
          legend.frame = NULL, legend.ticks = NULL, legend.ticks.length = structure(0.2, class = "rel"), 
          legend.axis.line = NULL, legend.text = <object>, legend.text.position = NULL, 
          legend.title = <object>, legend.title.position = NULL, 
          legend.position = "right", legend.position.inside = NULL, 
          legend.direction = NULL, legend.byrow = NULL, legend.justification = "center", 
          legend.justification.top = NULL, legend.justification.bottom = NULL, 
          legend.justification.left = NULL, legend.justification.right = NULL, 
          legend.justification.inside = NULL, legend.location = NULL, 
          legend.box = NULL, legend.box.just = NULL, legend.box.margin = structure(c(0, 
          0, 0, 0), class = c("ggplot2::margin", "simpleUnit", 
          "unit", "unit_v2", "S7_object"), S7_class = structure(function (t = 0, 
              r = 0, b = 0, l = 0, unit = "pt", ...) 
          {
              warn_dots_empty()
              lens <- c(length(t), length(r), length(b), length(l))
              if (any(lens != 1)) {
                  incorrect <- c("t", "r", "b", "l")[lens != 1]
                  s <- if (length(incorrect) > 1) 
                    "s"
                  else ""
                  cli::cli_warn(c("In {.fn margin}, the argument{s} {.and {.arg {incorrect}}} should \\\n        have length 1, not length {.and {lens[lens != 1]}}.", 
                    i = "Argument{s} get(s) truncated to length 1."))
                  t <- t[1]
                  r <- r[1]
                  b <- b[1]
                  l <- l[1]
              }
              u <- unit(c(t, r, b, l), unit)
              S7::new_object(u)
          }, name = "margin", parent = structure(list(class = c("simpleUnit", 
          "unit", "unit_v2"), constructor = function (.data) 
          {
              stop(sprintf("S3 class <%s> doesn't have a constructor", 
                  class[[1]]), call. = FALSE)
          }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(), abstract = FALSE, constructor = function (t = 0, 
              r = 0, b = 0, l = 0, unit = "pt", ...) 
          {
              warn_dots_empty()
              lens <- c(length(t), length(r), length(b), length(l))
              if (any(lens != 1)) {
                  incorrect <- c("t", "r", "b", "l")[lens != 1]
                  s <- if (length(incorrect) > 1) 
                    "s"
                  else ""
                  cli::cli_warn(c("In {.fn margin}, the argument{s} {.and {.arg {incorrect}}} should \\\n        have length 1, not length {.and {lens[lens != 1]}}.", 
                    i = "Argument{s} get(s) truncated to length 1."))
                  t <- t[1]
                  r <- r[1]
                  b <- b[1]
                  l <- l[1]
              }
              u <- unit(c(t, r, b, l), unit)
              S7::new_object(u)
          }, class = c("S7_class", "S7_object")), unit = 8L), legend.box.background = <object>, 
          legend.box.spacing = structure(2, class = "rel"), panel.background = <object>, 
          panel.border = <object>, panel.spacing = NULL, panel.spacing.x = NULL, 
          panel.spacing.y = NULL, panel.grid = <object>, panel.grid.major = NULL, 
          panel.grid.minor = <object>, panel.grid.major.x = NULL, 
          panel.grid.major.y = NULL, panel.grid.minor.x = NULL, 
          panel.grid.minor.y = NULL, panel.ontop = FALSE, panel.widths = NULL, 
          panel.heights = NULL, plot.background = <object>, plot.title = <object>, 
          plot.title.position = "panel", plot.subtitle = <object>, 
          plot.caption = <object>, plot.caption.position = "panel", 
          plot.tag = <object>, plot.tag.position = "topleft", plot.tag.location = NULL, 
          plot.margin = NULL, strip.background = <object>, strip.background.x = NULL, 
          strip.background.y = NULL, strip.clip = "on", strip.placement = "inside", 
          strip.text = <object>, strip.text.x = NULL, strip.text.x.bottom = NULL, 
          strip.text.x.top = NULL, strip.text.y = <object>, strip.text.y.left = <object>, 
          strip.text.y.right = NULL, strip.switch.pad.grid = structure(2.75, unit = 8L, class = c("simpleUnit", 
          "unit", "unit_v2")), strip.switch.pad.wrap = structure(2.75, unit = 8L, class = c("simpleUnit", 
          "unit", "unit_v2"))), class = c("theme", "ggplot2::theme", 
      "gg", "S7_object"), S7_class = structure(function (elements = list(), 
          ..., complete = FALSE, validate = TRUE) 
      {
          warn_dots_empty()
          S7::new_object(elements, complete = complete, validate = validate)
      }, name = "theme", parent = structure(list(class = "gg", 
          constructor = function (.data) 
          {
              stop(sprintf("S3 class <%s> doesn't have a constructor", 
                  class[[1]]), call. = FALSE)
          }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(
          complete = structure(list(name = "complete", class = structure(list(
              class = "logical", constructor_name = "logical", 
              constructor = function (.data = logical(0)) 
              .data, validator = function (object) 
              {
                  if (base_class(object) != name) {
                    sprintf("Underlying data must be <%s> not <%s>", 
                      name, base_class(object))
                  }
              }), class = "S7_base_class"), getter = NULL, setter = NULL, 
              validator = NULL, default = NULL), class = "S7_property"), 
          validate = structure(list(name = "validate", class = structure(list(
              class = "logical", constructor_name = "logical", 
              constructor = function (.data = logical(0)) 
              .data, validator = function (object) 
              {
                  if (base_class(object) != name) {
                    sprintf("Underlying data must be <%s> not <%s>", 
                      name, base_class(object))
                  }
              }), class = "S7_base_class"), getter = NULL, setter = NULL, 
              validator = NULL, default = NULL), class = "S7_property")), abstract = FALSE, constructor = function (elements = list(), 
          ..., complete = FALSE, validate = TRUE) 
      {
          warn_dots_empty()
          S7::new_object(elements, complete = complete, validate = validate)
      }, class = c("S7_class", "S7_object")), complete = TRUE, validate = TRUE), 
          structure(list(axis.title.x = <object>, axis.text.x = <object>, 
              axis.text.y = <object>, axis.ticks = <object>, axis.line = <object>, 
              legend.position = "none", panel.border = <object>, 
              panel.grid.major = <object>, panel.grid.minor = <object>, 
              plot.title = <object>, plot.margin = structure(c(0, 
              5.5, 0, 5.5), unit = 8L, class = c("simpleUnit", 
              "unit", "unit_v2"))), class = c("theme", "ggplot2::theme", 
          "gg", "S7_object"), S7_class = structure(function (elements = list(), 
              ..., complete = FALSE, validate = TRUE) 
          {
              warn_dots_empty()
              S7::new_object(elements, complete = complete, validate = validate)
          }, name = "theme", parent = structure(list(class = "gg", 
              constructor = function (.data) 
              {
                  stop(sprintf("S3 class <%s> doesn't have a constructor", 
                    class[[1]]), call. = FALSE)
              }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(
              complete = structure(list(name = "complete", class = structure(list(
                  class = "logical", constructor_name = "logical", 
                  constructor = function (.data = logical(0)) 
                  .data, validator = function (object) 
                  {
                    if (base_class(object) != name) {
                      sprintf("Underlying data must be <%s> not <%s>", 
                        name, base_class(object))
                    }
                  }), class = "S7_base_class"), getter = NULL, 
                  setter = NULL, validator = NULL, default = NULL), class = "S7_property"), 
              validate = structure(list(name = "validate", class = structure(list(
                  class = "logical", constructor_name = "logical", 
                  constructor = function (.data = logical(0)) 
                  .data, validator = function (object) 
                  {
                    if (base_class(object) != name) {
                      sprintf("Underlying data must be <%s> not <%s>", 
                        name, base_class(object))
                    }
                  }), class = "S7_base_class"), getter = NULL, 
                  setter = NULL, validator = NULL, default = NULL), class = "S7_property")), abstract = FALSE, constructor = function (elements = list(), 
              ..., complete = FALSE, validate = TRUE) 
          {
              warn_dots_empty()
              S7::new_object(elements, complete = complete, validate = validate)
          }, class = c("S7_class", "S7_object")), complete = FALSE, validate = TRUE), 
          structure(list(x = NULL), class = c("ggplot2::labels", 
          "gg", "S7_object"), S7_class = structure(function (labels = list(), 
              ...) 
          {
              warn_dots_empty()
              S7::new_object(labels)
          }, name = "labels", parent = structure(list(class = "gg", 
              constructor = function (.data) 
              {
                  stop(sprintf("S3 class <%s> doesn't have a constructor", 
                    class[[1]]), call. = FALSE)
              }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(), abstract = FALSE, constructor = function (labels = list(), 
              ...) 
          {
              warn_dots_empty()
              S7::new_object(labels)
          }, validator = function (self) 
          {
              if (!is.list(self)) {
                  return("labels must be a list.")
              }
              if (!is_named2(self)) {
                  return("every label must be named.")
              }
              dups <- unique(names(self)[duplicated(names(self))])
              if (length(dups) > 0) {
                  dups <- oxford_comma(dups, final = "and")
                  return(paste0("labels cannot contain duplicate names (", 
                    dups, ")."))
              }
              return(NULL)
          }, class = c("S7_class", "S7_object"))), structure(list(
              y = NULL), class = c("ggplot2::labels", "gg", "S7_object"
          ), S7_class = structure(function (labels = list(), ...) 
          {
              warn_dots_empty()
              S7::new_object(labels)
          }, name = "labels", parent = structure(list(class = "gg", 
              constructor = function (.data) 
              {
                  stop(sprintf("S3 class <%s> doesn't have a constructor", 
                    class[[1]]), call. = FALSE)
              }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(), abstract = FALSE, constructor = function (labels = list(), 
              ...) 
          {
              warn_dots_empty()
              S7::new_object(labels)
          }, validator = function (self) 
          {
              if (!is.list(self)) {
                  return("labels must be a list.")
              }
              if (!is_named2(self)) {
                  return("every label must be named.")
              }
              dups <- unique(names(self)[duplicated(names(self))])
              if (length(dups) > 0) {
                  dups <- oxford_comma(dups, final = "and")
                  return(paste0("labels cannot contain duplicate names (", 
                    dups, ")."))
              }
              return(NULL)
          }, class = c("S7_class", "S7_object")))), geom_blank.size = 3.5, 
      combine_plots = combine_plots, risktable_symbol_args = risktable_symbol_args)`: argument "risktable_height" is missing, with no default
  Backtrace:
      ▆
   1. └─vdiffr::expect_doppelganger("cuminc1-risktable", lst_cuminc_risktable[[1]]) at test-add_risktable.R:174:3
   2.   └─vdiffr (local) writer(fig, testcase, title)
   3.     ├─vdiffr:::print_plot(plot, title)
   4.     └─vdiffr:::print_plot.ggplot(plot, title)
   5.       ├─base::print(p)
   6.       └─ggsurvfit:::print.ggcuminc(p)
   7.         └─ggsurvfit::ggsurvfit_build(x, combine_plots = TRUE)
   8.           ├─rlang::inject(...)
   9.           └─ggsurvfit:::.construct_risktable(...)
  ── Failure ('test-add_risktable.R:186:3'): add_risktable() works with ggcuminc() and multiple outcomes ──
  `lst_cuminc_risktable_outcomes %>% lapply(function(x) print(x))` threw an unexpected error.
  Message: argument "risktable_height" is missing, with no default
  Class:   getvarError/missingArgError/error/condition
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test-add_risktable.R:186:3
    2. │ └─testthat:::expect_condition_matching(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─lst_cuminc_risktable_outcomes %>% ...
    8. └─base::lapply(., function(x) print(x))
    9.   └─ggsurvfit (local) FUN(X[[i]], ...)
   10.     ├─base::print(x) at test-add_risktable.R:187:46
   11.     └─ggsurvfit:::print.ggcuminc(x)
   12.       └─ggsurvfit::ggsurvfit_build(x, combine_plots = TRUE)
   13.         ├─rlang::inject(...)
   14.         └─ggsurvfit:::.construct_risktable(...)
  ── Error ('test-add_risktable.R:193:3'): add_risktable() works with ggcuminc() and multiple outcomes ──
  <getvarError/missingArgError/error/condition>
  Error in `.construct_risktable(x, geom_blank.times = NULL, geom_blank.risktable_stats = c("{n.risk}", 
  "{cum.event}"), geom_blank.stats_label = NULL, geom_blank.combine_groups = FALSE, 
      geom_blank.risktable_group = "auto", geom_blank.risktable_height = NULL, 
      geom_blank.theme = list(structure(list(line = <object>, rect = <object>, 
          text = <object>, title = <object>, point = <object>, 
          polygon = <object>, geom = <object>, spacing = structure(5.5, unit = 8L, class = c("simpleUnit", 
          "unit", "unit_v2")), margins = structure(c(5.5, 5.5, 
          5.5, 5.5), class = c("ggplot2::margin", "simpleUnit", 
          "unit", "unit_v2", "S7_object"), S7_class = structure(function (t = 0, 
              r = 0, b = 0, l = 0, unit = "pt", ...) 
          {
              warn_dots_empty()
              lens <- c(length(t), length(r), length(b), length(l))
              if (any(lens != 1)) {
                  incorrect <- c("t", "r", "b", "l")[lens != 1]
                  s <- if (length(incorrect) > 1) 
                    "s"
                  else ""
                  cli::cli_warn(c("In {.fn margin}, the argument{s} {.and {.arg {incorrect}}} should \\\n        have length 1, not length {.and {lens[lens != 1]}}.", 
                    i = "Argument{s} get(s) truncated to length 1."))
                  t <- t[1]
                  r <- r[1]
                  b <- b[1]
                  l <- l[1]
              }
              u <- unit(c(t, r, b, l), unit)
              S7::new_object(u)
          }, name = "margin", parent = structure(list(class = c("simpleUnit", 
          "unit", "unit_v2"), constructor = function (.data) 
          {
              stop(sprintf("S3 class <%s> doesn't have a constructor", 
                  class[[1]]), call. = FALSE)
          }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(), abstract = FALSE, constructor = function (t = 0, 
              r = 0, b = 0, l = 0, unit = "pt", ...) 
          {
              warn_dots_empty()
              lens <- c(length(t), length(r), length(b), length(l))
              if (any(lens != 1)) {
                  incorrect <- c("t", "r", "b", "l")[lens != 1]
                  s <- if (length(incorrect) > 1) 
                    "s"
                  else ""
                  cli::cli_warn(c("In {.fn margin}, the argument{s} {.and {.arg {incorrect}}} should \\\n        have length 1, not length {.and {lens[lens != 1]}}.", 
                    i = "Argument{s} get(s) truncated to length 1."))
                  t <- t[1]
                  r <- r[1]
                  b <- b[1]
                  l <- l[1]
              }
              u <- unit(c(t, r, b, l), unit)
              S7::new_object(u)
          }, class = c("S7_class", "S7_object")), unit = 8L), aspect.ratio = NULL, 
          axis.title = NULL, axis.title.x = <object>, axis.title.x.top = <object>, 
          axis.title.x.bottom = NULL, axis.title.y = <object>, 
          axis.title.y.left = NULL, axis.title.y.right = <object>, 
          axis.text = <object>, axis.text.x = <object>, axis.text.x.top = <object>, 
          axis.text.x.bottom = NULL, axis.text.y = <object>, axis.text.y.left = NULL, 
          axis.text.y.right = <object>, axis.text.theta = NULL, 
          axis.text.r = <object>, axis.ticks = <object>, axis.ticks.x = NULL, 
          axis.ticks.x.top = NULL, axis.ticks.x.bottom = NULL, 
          axis.ticks.y = NULL, axis.ticks.y.left = NULL, axis.ticks.y.right = NULL, 
          axis.ticks.theta = NULL, axis.ticks.r = NULL, axis.minor.ticks.x.top = NULL, 
          axis.minor.ticks.x.bottom = NULL, axis.minor.ticks.y.left = NULL, 
          axis.minor.ticks.y.right = NULL, axis.minor.ticks.theta = NULL, 
          axis.minor.ticks.r = NULL, axis.ticks.length = structure(0.5, class = "rel"), 
          axis.ticks.length.x = NULL, axis.ticks.length.x.top = NULL, 
          axis.ticks.length.x.bottom = NULL, axis.ticks.length.y = NULL, 
          axis.ticks.length.y.left = NULL, axis.ticks.length.y.right = NULL, 
          axis.ticks.length.theta = NULL, axis.ticks.length.r = NULL, 
          axis.minor.ticks.length = structure(0.75, class = "rel"), 
          axis.minor.ticks.length.x = NULL, axis.minor.ticks.length.x.top = NULL, 
          axis.minor.ticks.length.x.bottom = NULL, axis.minor.ticks.length.y = NULL, 
          axis.minor.ticks.length.y.left = NULL, axis.minor.ticks.length.y.right = NULL, 
          axis.minor.ticks.length.theta = NULL, axis.minor.ticks.length.r = NULL, 
          axis.line = <object>, axis.line.x = NULL, axis.line.x.top = NULL, 
          axis.line.x.bottom = NULL, axis.line.y = NULL, axis.line.y.left = NULL, 
          axis.line.y.right = NULL, axis.line.theta = NULL, axis.line.r = NULL, 
          legend.background = <object>, legend.margin = NULL, legend.spacing = structure(2, class = "rel"), 
          legend.spacing.x = NULL, legend.spacing.y = NULL, legend.key = NULL, 
          legend.key.size = structure(1.2, unit = 3L, class = c("simpleUnit", 
          "unit", "unit_v2")), legend.key.height = NULL, legend.key.width = NULL, 
          legend.key.spacing = NULL, legend.key.spacing.x = NULL, 
          legend.key.spacing.y = NULL, legend.key.justification = NULL, 
          legend.frame = NULL, legend.ticks = NULL, legend.ticks.length = structure(0.2, class = "rel"), 
          legend.axis.line = NULL, legend.text = <object>, legend.text.position = NULL, 
          legend.title = <object>, legend.title.position = NULL, 
          legend.position = "right", legend.position.inside = NULL, 
          legend.direction = NULL, legend.byrow = NULL, legend.justification = "center", 
          legend.justification.top = NULL, legend.justification.bottom = NULL, 
          legend.justification.left = NULL, legend.justification.right = NULL, 
          legend.justification.inside = NULL, legend.location = NULL, 
          legend.box = NULL, legend.box.just = NULL, legend.box.margin = structure(c(0, 
          0, 0, 0), class = c("ggplot2::margin", "simpleUnit", 
          "unit", "unit_v2", "S7_object"), S7_class = structure(function (t = 0, 
              r = 0, b = 0, l = 0, unit = "pt", ...) 
          {
              warn_dots_empty()
              lens <- c(length(t), length(r), length(b), length(l))
              if (any(lens != 1)) {
                  incorrect <- c("t", "r", "b", "l")[lens != 1]
                  s <- if (length(incorrect) > 1) 
                    "s"
                  else ""
                  cli::cli_warn(c("In {.fn margin}, the argument{s} {.and {.arg {incorrect}}} should \\\n        have length 1, not length {.and {lens[lens != 1]}}.", 
                    i = "Argument{s} get(s) truncated to length 1."))
                  t <- t[1]
                  r <- r[1]
                  b <- b[1]
                  l <- l[1]
              }
              u <- unit(c(t, r, b, l), unit)
              S7::new_object(u)
          }, name = "margin", parent = structure(list(class = c("simpleUnit", 
          "unit", "unit_v2"), constructor = function (.data) 
          {
              stop(sprintf("S3 class <%s> doesn't have a constructor", 
                  class[[1]]), call. = FALSE)
          }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(), abstract = FALSE, constructor = function (t = 0, 
              r = 0, b = 0, l = 0, unit = "pt", ...) 
          {
              warn_dots_empty()
              lens <- c(length(t), length(r), length(b), length(l))
              if (any(lens != 1)) {
                  incorrect <- c("t", "r", "b", "l")[lens != 1]
                  s <- if (length(incorrect) > 1) 
                    "s"
                  else ""
                  cli::cli_warn(c("In {.fn margin}, the argument{s} {.and {.arg {incorrect}}} should \\\n        have length 1, not length {.and {lens[lens != 1]}}.", 
                    i = "Argument{s} get(s) truncated to length 1."))
                  t <- t[1]
                  r <- r[1]
                  b <- b[1]
                  l <- l[1]
              }
              u <- unit(c(t, r, b, l), unit)
              S7::new_object(u)
          }, class = c("S7_class", "S7_object")), unit = 8L), legend.box.background = <object>, 
          legend.box.spacing = structure(2, class = "rel"), panel.background = <object>, 
          panel.border = <object>, panel.spacing = NULL, panel.spacing.x = NULL, 
          panel.spacing.y = NULL, panel.grid = <object>, panel.grid.major = NULL, 
          panel.grid.minor = <object>, panel.grid.major.x = NULL, 
          panel.grid.major.y = NULL, panel.grid.minor.x = NULL, 
          panel.grid.minor.y = NULL, panel.ontop = FALSE, panel.widths = NULL, 
          panel.heights = NULL, plot.background = <object>, plot.title = <object>, 
          plot.title.position = "panel", plot.subtitle = <object>, 
          plot.caption = <object>, plot.caption.position = "panel", 
          plot.tag = <object>, plot.tag.position = "topleft", plot.tag.location = NULL, 
          plot.margin = NULL, strip.background = <object>, strip.background.x = NULL, 
          strip.background.y = NULL, strip.clip = "on", strip.placement = "inside", 
          strip.text = <object>, strip.text.x = NULL, strip.text.x.bottom = NULL, 
          strip.text.x.top = NULL, strip.text.y = <object>, strip.text.y.left = <object>, 
          strip.text.y.right = NULL, strip.switch.pad.grid = structure(2.75, unit = 8L, class = c("simpleUnit", 
          "unit", "unit_v2")), strip.switch.pad.wrap = structure(2.75, unit = 8L, class = c("simpleUnit", 
          "unit", "unit_v2"))), class = c("theme", "ggplot2::theme", 
      "gg", "S7_object"), S7_class = structure(function (elements = list(), 
          ..., complete = FALSE, validate = TRUE) 
      {
          warn_dots_empty()
          S7::new_object(elements, complete = complete, validate = validate)
      }, name = "theme", parent = structure(list(class = "gg", 
          constructor = function (.data) 
          {
              stop(sprintf("S3 class <%s> doesn't have a constructor", 
                  class[[1]]), call. = FALSE)
          }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(
          complete = structure(list(name = "complete", class = structure(list(
              class = "logical", constructor_name = "logical", 
              constructor = function (.data = logical(0)) 
              .data, validator = function (object) 
              {
                  if (base_class(object) != name) {
                    sprintf("Underlying data must be <%s> not <%s>", 
                      name, base_class(object))
                  }
              }), class = "S7_base_class"), getter = NULL, setter = NULL, 
              validator = NULL, default = NULL), class = "S7_property"), 
          validate = structure(list(name = "validate", class = structure(list(
              class = "logical", constructor_name = "logical", 
              constructor = function (.data = logical(0)) 
              .data, validator = function (object) 
              {
                  if (base_class(object) != name) {
                    sprintf("Underlying data must be <%s> not <%s>", 
                      name, base_class(object))
                  }
              }), class = "S7_base_class"), getter = NULL, setter = NULL, 
              validator = NULL, default = NULL), class = "S7_property")), abstract = FALSE, constructor = function (elements = list(), 
          ..., complete = FALSE, validate = TRUE) 
      {
          warn_dots_empty()
          S7::new_object(elements, complete = complete, validate = validate)
      }, class = c("S7_class", "S7_object")), complete = TRUE, validate = TRUE), 
          structure(list(axis.title.x = <object>, axis.text.x = <object>, 
              axis.text.y = <object>, axis.ticks = <object>, axis.line = <object>, 
              legend.position = "none", panel.border = <object>, 
              panel.grid.major = <object>, panel.grid.minor = <object>, 
              plot.title = <object>, plot.margin = structure(c(0, 
              5.5, 0, 5.5), unit = 8L, class = c("simpleUnit", 
              "unit", "unit_v2"))), class = c("theme", "ggplot2::theme", 
          "gg", "S7_object"), S7_class = structure(function (elements = list(), 
              ..., complete = FALSE, validate = TRUE) 
          {
              warn_dots_empty()
              S7::new_object(elements, complete = complete, validate = validate)
          }, name = "theme", parent = structure(list(class = "gg", 
              constructor = function (.data) 
              {
                  stop(sprintf("S3 class <%s> doesn't have a constructor", 
                    class[[1]]), call. = FALSE)
              }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(
              complete = structure(list(name = "complete", class = structure(list(
                  class = "logical", constructor_name = "logical", 
                  constructor = function (.data = logical(0)) 
                  .data, validator = function (object) 
                  {
                    if (base_class(object) != name) {
                      sprintf("Underlying data must be <%s> not <%s>", 
                        name, base_class(object))
                    }
                  }), class = "S7_base_class"), getter = NULL, 
                  setter = NULL, validator = NULL, default = NULL), class = "S7_property"), 
              validate = structure(list(name = "validate", class = structure(list(
                  class = "logical", constructor_name = "logical", 
                  constructor = function (.data = logical(0)) 
                  .data, validator = function (object) 
                  {
                    if (base_class(object) != name) {
                      sprintf("Underlying data must be <%s> not <%s>", 
                        name, base_class(object))
                    }
                  }), class = "S7_base_class"), getter = NULL, 
                  setter = NULL, validator = NULL, default = NULL), class = "S7_property")), abstract = FALSE, constructor = function (elements = list(), 
              ..., complete = FALSE, validate = TRUE) 
          {
              warn_dots_empty()
              S7::new_object(elements, complete = complete, validate = validate)
          }, class = c("S7_class", "S7_object")), complete = FALSE, validate = TRUE), 
          structure(list(x = NULL), class = c("ggplot2::labels", 
          "gg", "S7_object"), S7_class = structure(function (labels = list(), 
              ...) 
          {
              warn_dots_empty()
              S7::new_object(labels)
          }, name = "labels", parent = structure(list(class = "gg", 
              constructor = function (.data) 
              {
                  stop(sprintf("S3 class <%s> doesn't have a constructor", 
                    class[[1]]), call. = FALSE)
              }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(), abstract = FALSE, constructor = function (labels = list(), 
              ...) 
          {
              warn_dots_empty()
              S7::new_object(labels)
          }, validator = function (self) 
          {
              if (!is.list(self)) {
                  return("labels must be a list.")
              }
              if (!is_named2(self)) {
                  return("every label must be named.")
              }
              dups <- unique(names(self)[duplicated(names(self))])
              if (length(dups) > 0) {
                  dups <- oxford_comma(dups, final = "and")
                  return(paste0("labels cannot contain duplicate names (", 
                    dups, ")."))
              }
              return(NULL)
          }, class = c("S7_class", "S7_object"))), structure(list(
              y = NULL), class = c("ggplot2::labels", "gg", "S7_object"
          ), S7_class = structure(function (labels = list(), ...) 
          {
              warn_dots_empty()
              S7::new_object(labels)
          }, name = "labels", parent = structure(list(class = "gg", 
              constructor = function (.data) 
              {
                  stop(sprintf("S3 class <%s> doesn't have a constructor", 
                    class[[1]]), call. = FALSE)
              }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(), abstract = FALSE, constructor = function (labels = list(), 
              ...) 
          {
              warn_dots_empty()
              S7::new_object(labels)
          }, validator = function (self) 
          {
              if (!is.list(self)) {
                  return("labels must be a list.")
              }
              if (!is_named2(self)) {
                  return("every label must be named.")
              }
              dups <- unique(names(self)[duplicated(names(self))])
              if (length(dups) > 0) {
                  dups <- oxford_comma(dups, final = "and")
                  return(paste0("labels cannot contain duplicate names (", 
                    dups, ")."))
              }
              return(NULL)
          }, class = c("S7_class", "S7_object")))), geom_blank.size = 3.5, 
      combine_plots = combine_plots, risktable_symbol_args = risktable_symbol_args)`: argument "risktable_height" is missing, with no default
  Backtrace:
      ▆
   1. └─vdiffr::expect_doppelganger(...) at test-add_risktable.R:193:3
   2.   └─vdiffr (local) writer(fig, testcase, title)
   3.     ├─vdiffr:::print_plot(plot, title)
   4.     └─vdiffr:::print_plot.ggplot(plot, title)
   5.       ├─base::print(p)
   6.       └─ggsurvfit:::print.ggcuminc(p)
   7.         └─ggsurvfit::ggsurvfit_build(x, combine_plots = TRUE)
   8.           ├─rlang::inject(...)
   9.           └─ggsurvfit:::.construct_risktable(...)
  ── Error ('test-add_risktable.R:208:3'): add_risktable() throws messages ───────
  <getvarError/missingArgError/error/condition>
  Error in `.construct_risktable(x, geom_blank.times = NULL, geom_blank.risktable_stats = c("{n.risk}", 
  "{cum.event}"), geom_blank.stats_label = NULL, geom_blank.combine_groups = FALSE, 
      geom_blank.risktable_group = "auto", geom_blank.risktable_height = NULL, 
      geom_blank.theme = list(structure(list(line = <object>, rect = <object>, 
          text = <object>, title = <object>, point = <object>, 
          polygon = <object>, geom = <object>, spacing = structure(5.5, unit = 8L, class = c("simpleUnit", 
          "unit", "unit_v2")), margins = structure(c(5.5, 5.5, 
          5.5, 5.5), class = c("ggplot2::margin", "simpleUnit", 
          "unit", "unit_v2", "S7_object"), S7_class = structure(function (t = 0, 
              r = 0, b = 0, l = 0, unit = "pt", ...) 
          {
              warn_dots_empty()
              lens <- c(length(t), length(r), length(b), length(l))
              if (any(lens != 1)) {
                  incorrect <- c("t", "r", "b", "l")[lens != 1]
                  s <- if (length(incorrect) > 1) 
                    "s"
                  else ""
                  cli::cli_warn(c("In {.fn margin}, the argument{s} {.and {.arg {incorrect}}} should \\\n        have length 1, not length {.and {lens[lens != 1]}}.", 
                    i = "Argument{s} get(s) truncated to length 1."))
                  t <- t[1]
                  r <- r[1]
                  b <- b[1]
                  l <- l[1]
              }
              u <- unit(c(t, r, b, l), unit)
              S7::new_object(u)
          }, name = "margin", parent = structure(list(class = c("simpleUnit", 
          "unit", "unit_v2"), constructor = function (.data) 
          {
              stop(sprintf("S3 class <%s> doesn't have a constructor", 
                  class[[1]]), call. = FALSE)
          }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(), abstract = FALSE, constructor = function (t = 0, 
              r = 0, b = 0, l = 0, unit = "pt", ...) 
          {
              warn_dots_empty()
              lens <- c(length(t), length(r), length(b), length(l))
              if (any(lens != 1)) {
                  incorrect <- c("t", "r", "b", "l")[lens != 1]
                  s <- if (length(incorrect) > 1) 
                    "s"
                  else ""
                  cli::cli_warn(c("In {.fn margin}, the argument{s} {.and {.arg {incorrect}}} should \\\n        have length 1, not length {.and {lens[lens != 1]}}.", 
                    i = "Argument{s} get(s) truncated to length 1."))
                  t <- t[1]
                  r <- r[1]
                  b <- b[1]
                  l <- l[1]
              }
              u <- unit(c(t, r, b, l), unit)
              S7::new_object(u)
          }, class = c("S7_class", "S7_object")), unit = 8L), aspect.ratio = NULL, 
          axis.title = NULL, axis.title.x = <object>, axis.title.x.top = <object>, 
          axis.title.x.bottom = NULL, axis.title.y = <object>, 
          axis.title.y.left = NULL, axis.title.y.right = <object>, 
          axis.text = <object>, axis.text.x = <object>, axis.text.x.top = <object>, 
          axis.text.x.bottom = NULL, axis.text.y = <object>, axis.text.y.left = NULL, 
          axis.text.y.right = <object>, axis.text.theta = NULL, 
          axis.text.r = <object>, axis.ticks = <object>, axis.ticks.x = NULL, 
          axis.ticks.x.top = NULL, axis.ticks.x.bottom = NULL, 
          axis.ticks.y = NULL, axis.ticks.y.left = NULL, axis.ticks.y.right = NULL, 
          axis.ticks.theta = NULL, axis.ticks.r = NULL, axis.minor.ticks.x.top = NULL, 
          axis.minor.ticks.x.bottom = NULL, axis.minor.ticks.y.left = NULL, 
          axis.minor.ticks.y.right = NULL, axis.minor.ticks.theta = NULL, 
          axis.minor.ticks.r = NULL, axis.ticks.length = structure(0.5, class = "rel"), 
          axis.ticks.length.x = NULL, axis.ticks.length.x.top = NULL, 
          axis.ticks.length.x.bottom = NULL, axis.ticks.length.y = NULL, 
          axis.ticks.length.y.left = NULL, axis.ticks.length.y.right = NULL, 
          axis.ticks.length.theta = NULL, axis.ticks.length.r = NULL, 
          axis.minor.ticks.length = structure(0.75, class = "rel"), 
          axis.minor.ticks.length.x = NULL, axis.minor.ticks.length.x.top = NULL, 
          axis.minor.ticks.length.x.bottom = NULL, axis.minor.ticks.length.y = NULL, 
          axis.minor.ticks.length.y.left = NULL, axis.minor.ticks.length.y.right = NULL, 
          axis.minor.ticks.length.theta = NULL, axis.minor.ticks.length.r = NULL, 
          axis.line = <object>, axis.line.x = NULL, axis.line.x.top = NULL, 
          axis.line.x.bottom = NULL, axis.line.y = NULL, axis.line.y.left = NULL, 
          axis.line.y.right = NULL, axis.line.theta = NULL, axis.line.r = NULL, 
          legend.background = <object>, legend.margin = NULL, legend.spacing = structure(2, class = "rel"), 
          legend.spacing.x = NULL, legend.spacing.y = NULL, legend.key = NULL, 
          legend.key.size = structure(1.2, unit = 3L, class = c("simpleUnit", 
          "unit", "unit_v2")), legend.key.height = NULL, legend.key.width = NULL, 
          legend.key.spacing = NULL, legend.key.spacing.x = NULL, 
          legend.key.spacing.y = NULL, legend.key.justification = NULL, 
          legend.frame = NULL, legend.ticks = NULL, legend.ticks.length = structure(0.2, class = "rel"), 
          legend.axis.line = NULL, legend.text = <object>, legend.text.position = NULL, 
          legend.title = <object>, legend.title.position = NULL, 
          legend.position = "right", legend.position.inside = NULL, 
          legend.direction = NULL, legend.byrow = NULL, legend.justification = "center", 
          legend.justification.top = NULL, legend.justification.bottom = NULL, 
          legend.justification.left = NULL, legend.justification.right = NULL, 
          legend.justification.inside = NULL, legend.location = NULL, 
          legend.box = NULL, legend.box.just = NULL, legend.box.margin = structure(c(0, 
          0, 0, 0), class = c("ggplot2::margin", "simpleUnit", 
          "unit", "unit_v2", "S7_object"), S7_class = structure(function (t = 0, 
              r = 0, b = 0, l = 0, unit = "pt", ...) 
          {
              warn_dots_empty()
              lens <- c(length(t), length(r), length(b), length(l))
              if (any(lens != 1)) {
                  incorrect <- c("t", "r", "b", "l")[lens != 1]
                  s <- if (length(incorrect) > 1) 
                    "s"
                  else ""
                  cli::cli_warn(c("In {.fn margin}, the argument{s} {.and {.arg {incorrect}}} should \\\n        have length 1, not length {.and {lens[lens != 1]}}.", 
                    i = "Argument{s} get(s) truncated to length 1."))
                  t <- t[1]
                  r <- r[1]
                  b <- b[1]
                  l <- l[1]
              }
              u <- unit(c(t, r, b, l), unit)
              S7::new_object(u)
          }, name = "margin", parent = structure(list(class = c("simpleUnit", 
          "unit", "unit_v2"), constructor = function (.data) 
          {
              stop(sprintf("S3 class <%s> doesn't have a constructor", 
                  class[[1]]), call. = FALSE)
          }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(), abstract = FALSE, constructor = function (t = 0, 
              r = 0, b = 0, l = 0, unit = "pt", ...) 
          {
              warn_dots_empty()
              lens <- c(length(t), length(r), length(b), length(l))
              if (any(lens != 1)) {
                  incorrect <- c("t", "r", "b", "l")[lens != 1]
                  s <- if (length(incorrect) > 1) 
                    "s"
                  else ""
                  cli::cli_warn(c("In {.fn margin}, the argument{s} {.and {.arg {incorrect}}} should \\\n        have length 1, not length {.and {lens[lens != 1]}}.", 
                    i = "Argument{s} get(s) truncated to length 1."))
                  t <- t[1]
                  r <- r[1]
                  b <- b[1]
                  l <- l[1]
              }
              u <- unit(c(t, r, b, l), unit)
              S7::new_object(u)
          }, class = c("S7_class", "S7_object")), unit = 8L), legend.box.background = <object>, 
          legend.box.spacing = structure(2, class = "rel"), panel.background = <object>, 
          panel.border = <object>, panel.spacing = NULL, panel.spacing.x = NULL, 
          panel.spacing.y = NULL, panel.grid = <object>, panel.grid.major = NULL, 
          panel.grid.minor = <object>, panel.grid.major.x = NULL, 
          panel.grid.major.y = NULL, panel.grid.minor.x = NULL, 
          panel.grid.minor.y = NULL, panel.ontop = FALSE, panel.widths = NULL, 
          panel.heights = NULL, plot.background = <object>, plot.title = <object>, 
          plot.title.position = "panel", plot.subtitle = <object>, 
          plot.caption = <object>, plot.caption.position = "panel", 
          plot.tag = <object>, plot.tag.position = "topleft", plot.tag.location = NULL, 
          plot.margin = NULL, strip.background = <object>, strip.background.x = NULL, 
          strip.background.y = NULL, strip.clip = "on", strip.placement = "inside", 
          strip.text = <object>, strip.text.x = NULL, strip.text.x.bottom = NULL, 
          strip.text.x.top = NULL, strip.text.y = <object>, strip.text.y.left = <object>, 
          strip.text.y.right = NULL, strip.switch.pad.grid = structure(2.75, unit = 8L, class = c("simpleUnit", 
          "unit", "unit_v2")), strip.switch.pad.wrap = structure(2.75, unit = 8L, class = c("simpleUnit", 
          "unit", "unit_v2"))), class = c("theme", "ggplot2::theme", 
      "gg", "S7_object"), S7_class = structure(function (elements = list(), 
          ..., complete = FALSE, validate = TRUE) 
      {
          warn_dots_empty()
          S7::new_object(elements, complete = complete, validate = validate)
      }, name = "theme", parent = structure(list(class = "gg", 
          constructor = function (.data) 
          {
              stop(sprintf("S3 class <%s> doesn't have a constructor", 
                  class[[1]]), call. = FALSE)
          }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(
          complete = structure(list(name = "complete", class = structure(list(
              class = "logical", constructor_name = "logical", 
              constructor = function (.data = logical(0)) 
              .data, validator = function (object) 
              {
                  if (base_class(object) != name) {
                    sprintf("Underlying data must be <%s> not <%s>", 
                      name, base_class(object))
                  }
              }), class = "S7_base_class"), getter = NULL, setter = NULL, 
              validator = NULL, default = NULL), class = "S7_property"), 
          validate = structure(list(name = "validate", class = structure(list(
              class = "logical", constructor_name = "logical", 
              constructor = function (.data = logical(0)) 
              .data, validator = function (object) 
              {
                  if (base_class(object) != name) {
                    sprintf("Underlying data must be <%s> not <%s>", 
                      name, base_class(object))
                  }
              }), class = "S7_base_class"), getter = NULL, setter = NULL, 
              validator = NULL, default = NULL), class = "S7_property")), abstract = FALSE, constructor = function (elements = list(), 
          ..., complete = FALSE, validate = TRUE) 
      {
          warn_dots_empty()
          S7::new_object(elements, complete = complete, validate = validate)
      }, class = c("S7_class", "S7_object")), complete = TRUE, validate = TRUE), 
          structure(list(axis.title.x = <object>, axis.text.x = <object>, 
              axis.text.y = <object>, axis.ticks = <object>, axis.line = <object>, 
              legend.position = "none", panel.border = <object>, 
              panel.grid.major = <object>, panel.grid.minor = <object>, 
              plot.title = <object>, plot.margin = structure(c(0, 
              5.5, 0, 5.5), unit = 8L, class = c("simpleUnit", 
              "unit", "unit_v2"))), class = c("theme", "ggplot2::theme", 
          "gg", "S7_object"), S7_class = structure(function (elements = list(), 
              ..., complete = FALSE, validate = TRUE) 
          {
              warn_dots_empty()
              S7::new_object(elements, complete = complete, validate = validate)
          }, name = "theme", parent = structure(list(class = "gg", 
              constructor = function (.data) 
              {
                  stop(sprintf("S3 class <%s> doesn't have a constructor", 
                    class[[1]]), call. = FALSE)
              }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(
              complete = structure(list(name = "complete", class = structure(list(
                  class = "logical", constructor_name = "logical", 
                  constructor = function (.data = logical(0)) 
                  .data, validator = function (object) 
                  {
                    if (base_class(object) != name) {
                      sprintf("Underlying data must be <%s> not <%s>", 
                        name, base_class(object))
                    }
                  }), class = "S7_base_class"), getter = NULL, 
                  setter = NULL, validator = NULL, default = NULL), class = "S7_property"), 
              validate = structure(list(name = "validate", class = structure(list(
                  class = "logical", constructor_name = "logical", 
                  constructor = function (.data = logical(0)) 
                  .data, validator = function (object) 
                  {
                    if (base_class(object) != name) {
                      sprintf("Underlying data must be <%s> not <%s>", 
                        name, base_class(object))
                    }
                  }), class = "S7_base_class"), getter = NULL, 
                  setter = NULL, validator = NULL, default = NULL), class = "S7_property")), abstract = FALSE, constructor = function (elements = list(), 
              ..., complete = FALSE, validate = TRUE) 
          {
              warn_dots_empty()
              S7::new_object(elements, complete = complete, validate = validate)
          }, class = c("S7_class", "S7_object")), complete = FALSE, validate = TRUE), 
          structure(list(x = NULL), class = c("ggplot2::labels", 
          "gg", "S7_object"), S7_class = structure(function (labels = list(), 
              ...) 
          {
              warn_dots_empty()
              S7::new_object(labels)
          }, name = "labels", parent = structure(list(class = "gg", 
              constructor = function (.data) 
              {
                  stop(sprintf("S3 class <%s> doesn't have a constructor", 
                    class[[1]]), call. = FALSE)
              }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(), abstract = FALSE, constructor = function (labels = list(), 
              ...) 
          {
              warn_dots_empty()
              S7::new_object(labels)
          }, validator = function (self) 
          {
              if (!is.list(self)) {
                  return("labels must be a list.")
              }
              if (!is_named2(self)) {
                  return("every label must be named.")
              }
              dups <- unique(names(self)[duplicated(names(self))])
              if (length(dups) > 0) {
                  dups <- oxford_comma(dups, final = "and")
                  return(paste0("labels cannot contain duplicate names (", 
                    dups, ")."))
              }
              return(NULL)
          }, class = c("S7_class", "S7_object"))), structure(list(
              y = NULL), class = c("ggplot2::labels", "gg", "S7_object"
          ), S7_class = structure(function (labels = list(), ...) 
          {
              warn_dots_empty()
              S7::new_object(labels)
          }, name = "labels", parent = structure(list(class = "gg", 
              constructor = function (.data) 
              {
                  stop(sprintf("S3 class <%s> doesn't have a constructor", 
                    class[[1]]), call. = FALSE)
              }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(), abstract = FALSE, constructor = function (labels = list(), 
              ...) 
          {
              warn_dots_empty()
              S7::new_object(labels)
          }, validator = function (self) 
          {
              if (!is.list(self)) {
                  return("labels must be a list.")
              }
              if (!is_named2(self)) {
                  return("every label must be named.")
              }
              dups <- unique(names(self)[duplicated(names(self))])
              if (length(dups) > 0) {
                  dups <- oxford_comma(dups, final = "and")
                  return(paste0("labels cannot contain duplicate names (", 
                    dups, ")."))
              }
              return(NULL)
          }, class = c("S7_class", "S7_object")))), geom_blank.size = 3.5, 
      combine_plots = combine_plots, risktable_symbol_args = risktable_symbol_args)`: argument "risktable_height" is missing, with no default
  Backtrace:
       ▆
    1. ├─testthat::expect_message(...) at test-add_risktable.R:208:3
    2. │ └─testthat:::expect_condition_matching(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─base::print(...)
    8. └─ggsurvfit:::print.ggsurvfit(...)
    9.   └─ggsurvfit::ggsurvfit_build(x, combine_plots = TRUE)
   10.     ├─rlang::inject(...)
   11.     └─ggsurvfit:::.construct_risktable(...)
  ── Failure ('test-add_risktable.R:237:3'): add_risktable() custom stats ────────
  `lst_custom_stats %>% lapply(function(x) print(x))` threw an unexpected error.
  Message: argument "risktable_height" is missing, with no default
  Class:   getvarError/missingArgError/error/condition
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test-add_risktable.R:237:3
    2. │ └─testthat:::expect_condition_matching(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─lst_custom_stats %>% lapply(function(x) print(x))
    8. └─base::lapply(., function(x) print(x))
    9.   └─ggsurvfit (local) FUN(X[[i]], ...)
   10.     ├─base::print(x) at test-add_risktable.R:237:44
   11.     └─ggsurvfit:::print.ggsurvfit(x)
   12.       └─ggsurvfit::ggsurvfit_build(x, combine_plots = TRUE)
   13.         ├─rlang::inject(...)
   14.         └─ggsurvfit:::.construct_risktable(...)
  ── Failure ('test-add_risktable.R:253:3'): add_risktable() custom stats ────────
  `lst_custom_stats2 %>% lapply(function(x) print(x))` threw an unexpected error.
  Message: argument "risktable_height" is missing, with no default
  Class:   getvarError/missingArgError/error/condition
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test-add_risktable.R:253:3
    2. │ └─testthat:::expect_condition_matching(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─lst_custom_stats2 %>% lapply(function(x) print(x))
    8. └─base::lapply(., function(x) print(x))
    9.   └─ggsurvfit (local) FUN(X[[i]], ...)
   10.     ├─base::print(x) at test-add_risktable.R:253:45
   11.     └─ggsurvfit:::print.ggsurvfit(x)
   12.       └─ggsurvfit::ggsurvfit_build(x, combine_plots = TRUE)
   13.         ├─rlang::inject(...)
   14.         └─ggsurvfit:::.construct_risktable(...)
  ── Error ('test-add_risktable.R:257:3'): add_risktable() custom stats ──────────
  <getvarError/missingArgError/error/condition>
  Error in `.construct_risktable(x, geom_blank.times = NULL, geom_blank.risktable_stats = c("{n.risk} ({cum.event})", 
  "{round(estimate*100)}% ({round(conf.low*100)}, {round(conf.high*100)})"
  ), geom_blank.stats_label = c("At Risk (Cum. Events)", "Survival (95% CI)"
  ), geom_blank.combine_groups = FALSE, geom_blank.risktable_group = "auto", 
      geom_blank.risktable_height = NULL, geom_blank.theme = list(
          structure(list(line = <object>, rect = <object>, text = <object>, 
              title = <object>, point = <object>, polygon = <object>, 
              geom = <object>, spacing = structure(5.5, unit = 8L, class = c("simpleUnit", 
              "unit", "unit_v2")), margins = structure(c(5.5, 5.5, 
              5.5, 5.5), class = c("ggplot2::margin", "simpleUnit", 
              "unit", "unit_v2", "S7_object"), S7_class = structure(function (t = 0, 
                  r = 0, b = 0, l = 0, unit = "pt", ...) 
              {
                  warn_dots_empty()
                  lens <- c(length(t), length(r), length(b), length(l))
                  if (any(lens != 1)) {
                    incorrect <- c("t", "r", "b", "l")[lens != 
                      1]
                    s <- if (length(incorrect) > 1) 
                      "s"
                    else ""
                    cli::cli_warn(c("In {.fn margin}, the argument{s} {.and {.arg {incorrect}}} should \\\n        have length 1, not length {.and {lens[lens != 1]}}.", 
                      i = "Argument{s} get(s) truncated to length 1."))
                    t <- t[1]
                    r <- r[1]
                    b <- b[1]
                    l <- l[1]
                  }
                  u <- unit(c(t, r, b, l), unit)
                  S7::new_object(u)
              }, name = "margin", parent = structure(list(class = c("simpleUnit", 
              "unit", "unit_v2"), constructor = function (.data) 
              {
                  stop(sprintf("S3 class <%s> doesn't have a constructor", 
                    class[[1]]), call. = FALSE)
              }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(), abstract = FALSE, constructor = function (t = 0, 
                  r = 0, b = 0, l = 0, unit = "pt", ...) 
              {
                  warn_dots_empty()
                  lens <- c(length(t), length(r), length(b), length(l))
                  if (any(lens != 1)) {
                    incorrect <- c("t", "r", "b", "l")[lens != 
                      1]
                    s <- if (length(incorrect) > 1) 
                      "s"
                    else ""
                    cli::cli_warn(c("In {.fn margin}, the argument{s} {.and {.arg {incorrect}}} should \\\n        have length 1, not length {.and {lens[lens != 1]}}.", 
                      i = "Argument{s} get(s) truncated to length 1."))
                    t <- t[1]
                    r <- r[1]
                    b <- b[1]
                    l <- l[1]
                  }
                  u <- unit(c(t, r, b, l), unit)
                  S7::new_object(u)
              }, class = c("S7_class", "S7_object")), unit = 8L), 
              aspect.ratio = NULL, axis.title = NULL, axis.title.x = <object>, 
              axis.title.x.top = <object>, axis.title.x.bottom = NULL, 
              axis.title.y = <object>, axis.title.y.left = NULL, 
              axis.title.y.right = <object>, axis.text = <object>, 
              axis.text.x = <object>, axis.text.x.top = <object>, 
              axis.text.x.bottom = NULL, axis.text.y = <object>, 
              axis.text.y.left = NULL, axis.text.y.right = <object>, 
              axis.text.theta = NULL, axis.text.r = <object>, axis.ticks = <object>, 
              axis.ticks.x = NULL, axis.ticks.x.top = NULL, axis.ticks.x.bottom = NULL, 
              axis.ticks.y = NULL, axis.ticks.y.left = NULL, axis.ticks.y.right = NULL, 
              axis.ticks.theta = NULL, axis.ticks.r = NULL, axis.minor.ticks.x.top = NULL, 
              axis.minor.ticks.x.bottom = NULL, axis.minor.ticks.y.left = NULL, 
              axis.minor.ticks.y.right = NULL, axis.minor.ticks.theta = NULL, 
              axis.minor.ticks.r = NULL, axis.ticks.length = structure(0.5, class = "rel"), 
              axis.ticks.length.x = NULL, axis.ticks.length.x.top = NULL, 
              axis.ticks.length.x.bottom = NULL, axis.ticks.length.y = NULL, 
              axis.ticks.length.y.left = NULL, axis.ticks.length.y.right = NULL, 
              axis.ticks.length.theta = NULL, axis.ticks.length.r = NULL, 
              axis.minor.ticks.length = structure(0.75, class = "rel"), 
              axis.minor.ticks.length.x = NULL, axis.minor.ticks.length.x.top = NULL, 
              axis.minor.ticks.length.x.bottom = NULL, axis.minor.ticks.length.y = NULL, 
              axis.minor.ticks.length.y.left = NULL, axis.minor.ticks.length.y.right = NULL, 
              axis.minor.ticks.length.theta = NULL, axis.minor.ticks.length.r = NULL, 
              axis.line = <object>, axis.line.x = NULL, axis.line.x.top = NULL, 
              axis.line.x.bottom = NULL, axis.line.y = NULL, axis.line.y.left = NULL, 
              axis.line.y.right = NULL, axis.line.theta = NULL, 
              axis.line.r = NULL, legend.background = <object>, 
              legend.margin = NULL, legend.spacing = structure(2, class = "rel"), 
              legend.spacing.x = NULL, legend.spacing.y = NULL, 
              legend.key = NULL, legend.key.size = structure(1.2, unit = 3L, class = c("simpleUnit", 
              "unit", "unit_v2")), legend.key.height = NULL, legend.key.width = NULL, 
              legend.key.spacing = NULL, legend.key.spacing.x = NULL, 
              legend.key.spacing.y = NULL, legend.key.justification = NULL, 
              legend.frame = NULL, legend.ticks = NULL, legend.ticks.length = structure(0.2, class = "rel"), 
              legend.axis.line = NULL, legend.text = <object>, 
              legend.text.position = NULL, legend.title = <object>, 
              legend.title.position = NULL, legend.position = "right", 
              legend.position.inside = NULL, legend.direction = NULL, 
              legend.byrow = NULL, legend.justification = "center", 
              legend.justification.top = NULL, legend.justification.bottom = NULL, 
              legend.justification.left = NULL, legend.justification.right = NULL, 
              legend.justification.inside = NULL, legend.location = NULL, 
              legend.box = NULL, legend.box.just = NULL, legend.box.margin = structure(c(0, 
              0, 0, 0), class = c("ggplot2::margin", "simpleUnit", 
              "unit", "unit_v2", "S7_object"), S7_class = structure(function (t = 0, 
                  r = 0, b = 0, l = 0, unit = "pt", ...) 
              {
                  warn_dots_empty()
                  lens <- c(length(t), length(r), length(b), length(l))
                  if (any(lens != 1)) {
                    incorrect <- c("t", "r", "b", "l")[lens != 
                      1]
                    s <- if (length(incorrect) > 1) 
                      "s"
                    else ""
                    cli::cli_warn(c("In {.fn margin}, the argument{s} {.and {.arg {incorrect}}} should \\\n        have length 1, not length {.and {lens[lens != 1]}}.", 
                      i = "Argument{s} get(s) truncated to length 1."))
                    t <- t[1]
                    r <- r[1]
                    b <- b[1]
                    l <- l[1]
                  }
                  u <- unit(c(t, r, b, l), unit)
                  S7::new_object(u)
              }, name = "margin", parent = structure(list(class = c("simpleUnit", 
              "unit", "unit_v2"), constructor = function (.data) 
              {
                  stop(sprintf("S3 class <%s> doesn't have a constructor", 
                    class[[1]]), call. = FALSE)
              }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(), abstract = FALSE, constructor = function (t = 0, 
                  r = 0, b = 0, l = 0, unit = "pt", ...) 
              {
                  warn_dots_empty()
                  lens <- c(length(t), length(r), length(b), length(l))
                  if (any(lens != 1)) {
                    incorrect <- c("t", "r", "b", "l")[lens != 
                      1]
                    s <- if (length(incorrect) > 1) 
                      "s"
                    else ""
                    cli::cli_warn(c("In {.fn margin}, the argument{s} {.and {.arg {incorrect}}} should \\\n        have length 1, not length {.and {lens[lens != 1]}}.", 
                      i = "Argument{s} get(s) truncated to length 1."))
                    t <- t[1]
                    r <- r[1]
                    b <- b[1]
                    l <- l[1]
                  }
                  u <- unit(c(t, r, b, l), unit)
                  S7::new_object(u)
              }, class = c("S7_class", "S7_object")), unit = 8L), 
              legend.box.background = <object>, legend.box.spacing = structure(2, class = "rel"), 
              panel.background = <object>, panel.border = <object>, 
              panel.spacing = NULL, panel.spacing.x = NULL, panel.spacing.y = NULL, 
              panel.grid = <object>, panel.grid.major = NULL, panel.grid.minor = <object>, 
              panel.grid.major.x = NULL, panel.grid.major.y = NULL, 
              panel.grid.minor.x = NULL, panel.grid.minor.y = NULL, 
              panel.ontop = FALSE, panel.widths = NULL, panel.heights = NULL, 
              plot.background = <object>, plot.title = <object>, 
              plot.title.position = "panel", plot.subtitle = <object>, 
              plot.caption = <object>, plot.caption.position = "panel", 
              plot.tag = <object>, plot.tag.position = "topleft", 
              plot.tag.location = NULL, plot.margin = NULL, strip.background = <object>, 
              strip.background.x = NULL, strip.background.y = NULL, 
              strip.clip = "on", strip.placement = "inside", strip.text = <object>, 
              strip.text.x = NULL, strip.text.x.bottom = NULL, 
              strip.text.x.top = NULL, strip.text.y = <object>, 
              strip.text.y.left = <object>, strip.text.y.right = NULL, 
              strip.switch.pad.grid = structure(2.75, unit = 8L, class = c("simpleUnit", 
              "unit", "unit_v2")), strip.switch.pad.wrap = structure(2.75, unit = 8L, class = c("simpleUnit", 
              "unit", "unit_v2"))), class = c("theme", "ggplot2::theme", 
          "gg", "S7_object"), S7_class = structure(function (elements = list(), 
              ..., complete = FALSE, validate = TRUE) 
          {
              warn_dots_empty()
              S7::new_object(elements, complete = complete, validate = validate)
          }, name = "theme", parent = structure(list(class = "gg", 
              constructor = function (.data) 
              {
                  stop(sprintf("S3 class <%s> doesn't have a constructor", 
                    class[[1]]), call. = FALSE)
              }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(
              complete = structure(list(name = "complete", class = structure(list(
                  class = "logical", constructor_name = "logical", 
                  constructor = function (.data = logical(0)) 
                  .data, validator = function (object) 
                  {
                    if (base_class(object) != name) {
                      sprintf("Underlying data must be <%s> not <%s>", 
                        name, base_class(object))
                    }
                  }), class = "S7_base_class"), getter = NULL, 
                  setter = NULL, validator = NULL, default = NULL), class = "S7_property"), 
              validate = structure(list(name = "validate", class = structure(list(
                  class = "logical", constructor_name = "logical", 
                  constructor = function (.data = logical(0)) 
                  .data, validator = function (object) 
                  {
                    if (base_class(object) != name) {
                      sprintf("Underlying data must be <%s> not <%s>", 
                        name, base_class(object))
                    }
                  }), class = "S7_base_class"), getter = NULL, 
                  setter = NULL, validator = NULL, default = NULL), class = "S7_property")), abstract = FALSE, constructor = function (elements = list(), 
              ..., complete = FALSE, validate = TRUE) 
          {
              warn_dots_empty()
              S7::new_object(elements, complete = complete, validate = validate)
          }, class = c("S7_class", "S7_object")), complete = TRUE, validate = TRUE), 
          structure(list(axis.title.x = <object>, axis.text.x = <object>, 
              axis.text.y = <object>, axis.ticks = <object>, axis.line = <object>, 
              legend.position = "none", panel.border = <object>, 
              panel.grid.major = <object>, panel.grid.minor = <object>, 
              plot.title = <object>, plot.margin = structure(c(0, 
              5.5, 0, 5.5), unit = 8L, class = c("simpleUnit", 
              "unit", "unit_v2"))), class = c("theme", "ggplot2::theme", 
          "gg", "S7_object"), S7_class = structure(function (elements = list(), 
              ..., complete = FALSE, validate = TRUE) 
          {
              warn_dots_empty()
              S7::new_object(elements, complete = complete, validate = validate)
          }, name = "theme", parent = structure(list(class = "gg", 
              constructor = function (.data) 
              {
                  stop(sprintf("S3 class <%s> doesn't have a constructor", 
                    class[[1]]), call. = FALSE)
              }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(
              complete = structure(list(name = "complete", class = structure(list(
                  class = "logical", constructor_name = "logical", 
                  constructor = function (.data = logical(0)) 
                  .data, validator = function (object) 
                  {
                    if (base_class(object) != name) {
                      sprintf("Underlying data must be <%s> not <%s>", 
                        name, base_class(object))
                    }
                  }), class = "S7_base_class"), getter = NULL, 
                  setter = NULL, validator = NULL, default = NULL), class = "S7_property"), 
              validate = structure(list(name = "validate", class = structure(list(
                  class = "logical", constructor_name = "logical", 
                  constructor = function (.data = logical(0)) 
                  .data, validator = function (object) 
                  {
                    if (base_class(object) != name) {
                      sprintf("Underlying data must be <%s> not <%s>", 
                        name, base_class(object))
                    }
                  }), class = "S7_base_class"), getter = NULL, 
                  setter = NULL, validator = NULL, default = NULL), class = "S7_property")), abstract = FALSE, constructor = function (elements = list(), 
              ..., complete = FALSE, validate = TRUE) 
          {
              warn_dots_empty()
              S7::new_object(elements, complete = complete, validate = validate)
          }, class = c("S7_class", "S7_object")), complete = FALSE, validate = TRUE), 
          structure(list(x = NULL), class = c("ggplot2::labels", 
          "gg", "S7_object"), S7_class = structure(function (labels = list(), 
              ...) 
          {
              warn_dots_empty()
              S7::new_object(labels)
          }, name = "labels", parent = structure(list(class = "gg", 
              constructor = function (.data) 
              {
                  stop(sprintf("S3 class <%s> doesn't have a constructor", 
                    class[[1]]), call. = FALSE)
              }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(), abstract = FALSE, constructor = function (labels = list(), 
              ...) 
          {
              warn_dots_empty()
              S7::new_object(labels)
          }, validator = function (self) 
          {
              if (!is.list(self)) {
                  return("labels must be a list.")
              }
              if (!is_named2(self)) {
                  return("every label must be named.")
              }
              dups <- unique(names(self)[duplicated(names(self))])
              if (length(dups) > 0) {
                  dups <- oxford_comma(dups, final = "and")
                  return(paste0("labels cannot contain duplicate names (", 
                    dups, ")."))
              }
              return(NULL)
          }, class = c("S7_class", "S7_object"))), structure(list(
              y = NULL), class = c("ggplot2::labels", "gg", "S7_object"
          ), S7_class = structure(function (labels = list(), ...) 
          {
              warn_dots_empty()
              S7::new_object(labels)
          }, name = "labels", parent = structure(list(class = "gg", 
              constructor = function (.data) 
              {
                  stop(sprintf("S3 class <%s> doesn't have a constructor", 
                    class[[1]]), call. = FALSE)
              }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(), abstract = FALSE, constructor = function (labels = list(), 
              ...) 
          {
              warn_dots_empty()
              S7::new_object(labels)
          }, validator = function (self) 
          {
              if (!is.list(self)) {
                  return("labels must be a list.")
              }
              if (!is_named2(self)) {
                  return("every label must be named.")
              }
              dups <- unique(names(self)[duplicated(names(self))])
              if (length(dups) > 0) {
                  dups <- oxford_comma(dups, final = "and")
                  return(paste0("labels cannot contain duplicate names (", 
                    dups, ")."))
              }
              return(NULL)
          }, class = c("S7_class", "S7_object")))), geom_blank.size = 3.5, 
      combine_plots = combine_plots, risktable_symbol_args = risktable_symbol_args)`: argument "risktable_height" is missing, with no default
  Backtrace:
      ▆
   1. └─vdiffr::expect_doppelganger(...) at test-add_risktable.R:257:3
   2.   └─vdiffr (local) writer(fig, testcase, title)
   3.     ├─vdiffr:::print_plot(plot, title)
   4.     └─vdiffr:::print_plot.ggplot(plot, title)
   5.       ├─base::print(p)
   6.       └─ggsurvfit:::print.ggsurvfit(p)
   7.         └─ggsurvfit::ggsurvfit_build(x, combine_plots = TRUE)
   8.           ├─rlang::inject(...)
   9.           └─ggsurvfit:::.construct_risktable(...)
  ── Failure ('test-add_risktable.R:273:3'): add_risktable() works with Cox models ──
  `(ggsurvfit(sf_cox) + add_risktable()) %>% ggsurvfit_build()` threw an unexpected error.
  Message: argument "risktable_height" is missing, with no default
  Class:   getvarError/missingArgError/error/condition
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test-add_risktable.R:273:3
    2. │ └─testthat:::expect_condition_matching(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─(ggsurvfit(sf_cox) + add_risktable()) %>% ggsurvfit_build()
    8. └─ggsurvfit::ggsurvfit_build(.)
    9.   ├─rlang::inject(...)
   10.   └─ggsurvfit:::.construct_risktable(...)
  ── Error ('test-add_risktable.R:319:3'): add_risktable() works with ggsurvfit() `start.time` and negative times ──
  <getvarError/missingArgError/error/condition>
  Error in `.construct_risktable(x, geom_blank.times = NULL, geom_blank.risktable_stats = c("{n.risk}", 
  "{cum.event}"), geom_blank.stats_label = NULL, geom_blank.combine_groups = FALSE, 
      geom_blank.risktable_group = "auto", geom_blank.risktable_height = NULL, 
      geom_blank.theme = list(structure(list(line = <object>, rect = <object>, 
          text = <object>, title = <object>, point = <object>, 
          polygon = <object>, geom = <object>, spacing = structure(5.5, unit = 8L, class = c("simpleUnit", 
          "unit", "unit_v2")), margins = structure(c(5.5, 5.5, 
          5.5, 5.5), class = c("ggplot2::margin", "simpleUnit", 
          "unit", "unit_v2", "S7_object"), S7_class = structure(function (t = 0, 
              r = 0, b = 0, l = 0, unit = "pt", ...) 
          {
              warn_dots_empty()
              lens <- c(length(t), length(r), length(b), length(l))
              if (any(lens != 1)) {
                  incorrect <- c("t", "r", "b", "l")[lens != 1]
                  s <- if (length(incorrect) > 1) 
                    "s"
                  else ""
                  cli::cli_warn(c("In {.fn margin}, the argument{s} {.and {.arg {incorrect}}} should \\\n        have length 1, not length {.and {lens[lens != 1]}}.", 
                    i = "Argument{s} get(s) truncated to length 1."))
                  t <- t[1]
                  r <- r[1]
                  b <- b[1]
                  l <- l[1]
              }
              u <- unit(c(t, r, b, l), unit)
              S7::new_object(u)
          }, name = "margin", parent = structure(list(class = c("simpleUnit", 
          "unit", "unit_v2"), constructor = function (.data) 
          {
              stop(sprintf("S3 class <%s> doesn't have a constructor", 
                  class[[1]]), call. = FALSE)
          }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(), abstract = FALSE, constructor = function (t = 0, 
              r = 0, b = 0, l = 0, unit = "pt", ...) 
          {
              warn_dots_empty()
              lens <- c(length(t), length(r), length(b), length(l))
              if (any(lens != 1)) {
                  incorrect <- c("t", "r", "b", "l")[lens != 1]
                  s <- if (length(incorrect) > 1) 
                    "s"
                  else ""
                  cli::cli_warn(c("In {.fn margin}, the argument{s} {.and {.arg {incorrect}}} should \\\n        have length 1, not length {.and {lens[lens != 1]}}.", 
                    i = "Argument{s} get(s) truncated to length 1."))
                  t <- t[1]
                  r <- r[1]
                  b <- b[1]
                  l <- l[1]
              }
              u <- unit(c(t, r, b, l), unit)
              S7::new_object(u)
          }, class = c("S7_class", "S7_object")), unit = 8L), aspect.ratio = NULL, 
          axis.title = NULL, axis.title.x = <object>, axis.title.x.top = <object>, 
          axis.title.x.bottom = NULL, axis.title.y = <object>, 
          axis.title.y.left = NULL, axis.title.y.right = <object>, 
          axis.text = <object>, axis.text.x = <object>, axis.text.x.top = <object>, 
          axis.text.x.bottom = NULL, axis.text.y = <object>, axis.text.y.left = NULL, 
          axis.text.y.right = <object>, axis.text.theta = NULL, 
          axis.text.r = <object>, axis.ticks = <object>, axis.ticks.x = NULL, 
          axis.ticks.x.top = NULL, axis.ticks.x.bottom = NULL, 
          axis.ticks.y = NULL, axis.ticks.y.left = NULL, axis.ticks.y.right = NULL, 
          axis.ticks.theta = NULL, axis.ticks.r = NULL, axis.minor.ticks.x.top = NULL, 
          axis.minor.ticks.x.bottom = NULL, axis.minor.ticks.y.left = NULL, 
          axis.minor.ticks.y.right = NULL, axis.minor.ticks.theta = NULL, 
          axis.minor.ticks.r = NULL, axis.ticks.length = structure(0.5, class = "rel"), 
          axis.ticks.length.x = NULL, axis.ticks.length.x.top = NULL, 
          axis.ticks.length.x.bottom = NULL, axis.ticks.length.y = NULL, 
          axis.ticks.length.y.left = NULL, axis.ticks.length.y.right = NULL, 
          axis.ticks.length.theta = NULL, axis.ticks.length.r = NULL, 
          axis.minor.ticks.length = structure(0.75, class = "rel"), 
          axis.minor.ticks.length.x = NULL, axis.minor.ticks.length.x.top = NULL, 
          axis.minor.ticks.length.x.bottom = NULL, axis.minor.ticks.length.y = NULL, 
          axis.minor.ticks.length.y.left = NULL, axis.minor.ticks.length.y.right = NULL, 
          axis.minor.ticks.length.theta = NULL, axis.minor.ticks.length.r = NULL, 
          axis.line = <object>, axis.line.x = NULL, axis.line.x.top = NULL, 
          axis.line.x.bottom = NULL, axis.line.y = NULL, axis.line.y.left = NULL, 
          axis.line.y.right = NULL, axis.line.theta = NULL, axis.line.r = NULL, 
          legend.background = <object>, legend.margin = NULL, legend.spacing = structure(2, class = "rel"), 
          legend.spacing.x = NULL, legend.spacing.y = NULL, legend.key = NULL, 
          legend.key.size = structure(1.2, unit = 3L, class = c("simpleUnit", 
          "unit", "unit_v2")), legend.key.height = NULL, legend.key.width = NULL, 
          legend.key.spacing = NULL, legend.key.spacing.x = NULL, 
          legend.key.spacing.y = NULL, legend.key.justification = NULL, 
          legend.frame = NULL, legend.ticks = NULL, legend.ticks.length = structure(0.2, class = "rel"), 
          legend.axis.line = NULL, legend.text = <object>, legend.text.position = NULL, 
          legend.title = <object>, legend.title.position = NULL, 
          legend.position = "right", legend.position.inside = NULL, 
          legend.direction = NULL, legend.byrow = NULL, legend.justification = "center", 
          legend.justification.top = NULL, legend.justification.bottom = NULL, 
          legend.justification.left = NULL, legend.justification.right = NULL, 
          legend.justification.inside = NULL, legend.location = NULL, 
          legend.box = NULL, legend.box.just = NULL, legend.box.margin = structure(c(0, 
          0, 0, 0), class = c("ggplot2::margin", "simpleUnit", 
          "unit", "unit_v2", "S7_object"), S7_class = structure(function (t = 0, 
              r = 0, b = 0, l = 0, unit = "pt", ...) 
          {
              warn_dots_empty()
              lens <- c(length(t), length(r), length(b), length(l))
              if (any(lens != 1)) {
                  incorrect <- c("t", "r", "b", "l")[lens != 1]
                  s <- if (length(incorrect) > 1) 
                    "s"
                  else ""
                  cli::cli_warn(c("In {.fn margin}, the argument{s} {.and {.arg {incorrect}}} should \\\n        have length 1, not length {.and {lens[lens != 1]}}.", 
                    i = "Argument{s} get(s) truncated to length 1."))
                  t <- t[1]
                  r <- r[1]
                  b <- b[1]
                  l <- l[1]
              }
              u <- unit(c(t, r, b, l), unit)
              S7::new_object(u)
          }, name = "margin", parent = structure(list(class = c("simpleUnit", 
          "unit", "unit_v2"), constructor = function (.data) 
          {
              stop(sprintf("S3 class <%s> doesn't have a constructor", 
                  class[[1]]), call. = FALSE)
          }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(), abstract = FALSE, constructor = function (t = 0, 
              r = 0, b = 0, l = 0, unit = "pt", ...) 
          {
              warn_dots_empty()
              lens <- c(length(t), length(r), length(b), length(l))
              if (any(lens != 1)) {
                  incorrect <- c("t", "r", "b", "l")[lens != 1]
                  s <- if (length(incorrect) > 1) 
                    "s"
                  else ""
                  cli::cli_warn(c("In {.fn margin}, the argument{s} {.and {.arg {incorrect}}} should \\\n        have length 1, not length {.and {lens[lens != 1]}}.", 
                    i = "Argument{s} get(s) truncated to length 1."))
                  t <- t[1]
                  r <- r[1]
                  b <- b[1]
                  l <- l[1]
              }
              u <- unit(c(t, r, b, l), unit)
              S7::new_object(u)
          }, class = c("S7_class", "S7_object")), unit = 8L), legend.box.background = <object>, 
          legend.box.spacing = structure(2, class = "rel"), panel.background = <object>, 
          panel.border = <object>, panel.spacing = NULL, panel.spacing.x = NULL, 
          panel.spacing.y = NULL, panel.grid = <object>, panel.grid.major = NULL, 
          panel.grid.minor = <object>, panel.grid.major.x = NULL, 
          panel.grid.major.y = NULL, panel.grid.minor.x = NULL, 
          panel.grid.minor.y = NULL, panel.ontop = FALSE, panel.widths = NULL, 
          panel.heights = NULL, plot.background = <object>, plot.title = <object>, 
          plot.title.position = "panel", plot.subtitle = <object>, 
          plot.caption = <object>, plot.caption.position = "panel", 
          plot.tag = <object>, plot.tag.position = "topleft", plot.tag.location = NULL, 
          plot.margin = NULL, strip.background = <object>, strip.background.x = NULL, 
          strip.background.y = NULL, strip.clip = "on", strip.placement = "inside", 
          strip.text = <object>, strip.text.x = NULL, strip.text.x.bottom = NULL, 
          strip.text.x.top = NULL, strip.text.y = <object>, strip.text.y.left = <object>, 
          strip.text.y.right = NULL, strip.switch.pad.grid = structure(2.75, unit = 8L, class = c("simpleUnit", 
          "unit", "unit_v2")), strip.switch.pad.wrap = structure(2.75, unit = 8L, class = c("simpleUnit", 
          "unit", "unit_v2"))), class = c("theme", "ggplot2::theme", 
      "gg", "S7_object"), S7_class = structure(function (elements = list(), 
          ..., complete = FALSE, validate = TRUE) 
      {
          warn_dots_empty()
          S7::new_object(elements, complete = complete, validate = validate)
      }, name = "theme", parent = structure(list(class = "gg", 
          constructor = function (.data) 
          {
              stop(sprintf("S3 class <%s> doesn't have a constructor", 
                  class[[1]]), call. = FALSE)
          }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(
          complete = structure(list(name = "complete", class = structure(list(
              class = "logical", constructor_name = "logical", 
              constructor = function (.data = logical(0)) 
              .data, validator = function (object) 
              {
                  if (base_class(object) != name) {
                    sprintf("Underlying data must be <%s> not <%s>", 
                      name, base_class(object))
                  }
              }), class = "S7_base_class"), getter = NULL, setter = NULL, 
              validator = NULL, default = NULL), class = "S7_property"), 
          validate = structure(list(name = "validate", class = structure(list(
              class = "logical", constructor_name = "logical", 
              constructor = function (.data = logical(0)) 
              .data, validator = function (object) 
              {
                  if (base_class(object) != name) {
                    sprintf("Underlying data must be <%s> not <%s>", 
                      name, base_class(object))
                  }
              }), class = "S7_base_class"), getter = NULL, setter = NULL, 
              validator = NULL, default = NULL), class = "S7_property")), abstract = FALSE, constructor = function (elements = list(), 
          ..., complete = FALSE, validate = TRUE) 
      {
          warn_dots_empty()
          S7::new_object(elements, complete = complete, validate = validate)
      }, class = c("S7_class", "S7_object")), complete = TRUE, validate = TRUE), 
          structure(list(axis.title.x = <object>, axis.text.x = <object>, 
              axis.text.y = <object>, axis.ticks = <object>, axis.line = <object>, 
              legend.position = "none", panel.border = <object>, 
              panel.grid.major = <object>, panel.grid.minor = <object>, 
              plot.title = <object>, plot.margin = structure(c(0, 
              5.5, 0, 5.5), unit = 8L, class = c("simpleUnit", 
              "unit", "unit_v2"))), class = c("theme", "ggplot2::theme", 
          "gg", "S7_object"), S7_class = structure(function (elements = list(), 
              ..., complete = FALSE, validate = TRUE) 
          {
              warn_dots_empty()
              S7::new_object(elements, complete = complete, validate = validate)
          }, name = "theme", parent = structure(list(class = "gg", 
              constructor = function (.data) 
              {
                  stop(sprintf("S3 class <%s> doesn't have a constructor", 
                    class[[1]]), call. = FALSE)
              }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(
              complete = structure(list(name = "complete", class = structure(list(
                  class = "logical", constructor_name = "logical", 
                  constructor = function (.data = logical(0)) 
                  .data, validator = function (object) 
                  {
                    if (base_class(object) != name) {
                      sprintf("Underlying data must be <%s> not <%s>", 
                        name, base_class(object))
                    }
                  }), class = "S7_base_class"), getter = NULL, 
                  setter = NULL, validator = NULL, default = NULL), class = "S7_property"), 
              validate = structure(list(name = "validate", class = structure(list(
                  class = "logical", constructor_name = "logical", 
                  constructor = function (.data = logical(0)) 
                  .data, validator = function (object) 
                  {
                    if (base_class(object) != name) {
                      sprintf("Underlying data must be <%s> not <%s>", 
                        name, base_class(object))
                    }
                  }), class = "S7_base_class"), getter = NULL, 
                  setter = NULL, validator = NULL, default = NULL), class = "S7_property")), abstract = FALSE, constructor = function (elements = list(), 
              ..., complete = FALSE, validate = TRUE) 
          {
              warn_dots_empty()
              S7::new_object(elements, complete = complete, validate = validate)
          }, class = c("S7_class", "S7_object")), complete = FALSE, validate = TRUE), 
          structure(list(x = NULL), class = c("ggplot2::labels", 
          "gg", "S7_object"), S7_class = structure(function (labels = list(), 
              ...) 
          {
              warn_dots_empty()
              S7::new_object(labels)
          }, name = "labels", parent = structure(list(class = "gg", 
              constructor = function (.data) 
              {
                  stop(sprintf("S3 class <%s> doesn't have a constructor", 
                    class[[1]]), call. = FALSE)
              }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(), abstract = FALSE, constructor = function (labels = list(), 
              ...) 
          {
              warn_dots_empty()
              S7::new_object(labels)
          }, validator = function (self) 
          {
              if (!is.list(self)) {
                  return("labels must be a list.")
              }
              if (!is_named2(self)) {
                  return("every label must be named.")
              }
              dups <- unique(names(self)[duplicated(names(self))])
              if (length(dups) > 0) {
                  dups <- oxford_comma(dups, final = "and")
                  return(paste0("labels cannot contain duplicate names (", 
                    dups, ")."))
              }
              return(NULL)
          }, class = c("S7_class", "S7_object"))), structure(list(
              y = NULL), class = c("ggplot2::labels", "gg", "S7_object"
          ), S7_class = structure(function (labels = list(), ...) 
          {
              warn_dots_empty()
              S7::new_object(labels)
          }, name = "labels", parent = structure(list(class = "gg", 
              constructor = function (.data) 
              {
                  stop(sprintf("S3 class <%s> doesn't have a constructor", 
                    class[[1]]), call. = FALSE)
              }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(), abstract = FALSE, constructor = function (labels = list(), 
              ...) 
          {
              warn_dots_empty()
              S7::new_object(labels)
          }, validator = function (self) 
          {
              if (!is.list(self)) {
                  return("labels must be a list.")
              }
              if (!is_named2(self)) {
                  return("every label must be named.")
              }
              dups <- unique(names(self)[duplicated(names(self))])
              if (length(dups) > 0) {
                  dups <- oxford_comma(dups, final = "and")
                  return(paste0("labels cannot contain duplicate names (", 
                    dups, ")."))
              }
              return(NULL)
          }, class = c("S7_class", "S7_object")))), geom_blank.size = 3.5, 
      combine_plots = combine_plots, risktable_symbol_args = risktable_symbol_args)`: argument "risktable_height" is missing, with no default
  Backtrace:
      ▆
   1. └─vdiffr::expect_doppelganger("sf-negative_time", sf_negative_time) at test-add_risktable.R:319:3
   2.   └─vdiffr (local) writer(fig, testcase, title)
   3.     ├─vdiffr:::print_plot(plot, title)
   4.     └─vdiffr:::print_plot.ggplot(plot, title)
   5.       ├─base::print(p)
   6.       └─ggsurvfit:::print.ggsurvfit(p)
   7.         └─ggsurvfit::ggsurvfit_build(x, combine_plots = TRUE)
   8.           ├─rlang::inject(...)
   9.           └─ggsurvfit:::.construct_risktable(...)
  ── Failure ('test-add_risktable_strata_symbol.R:10:3'): add_risktable_strata_symbol() works ──
  `(p + add_risktable_strata_symbol(symbol = "O")) %>% ggsurvfit_build()` threw an unexpected error.
  Message: argument "risktable_height" is missing, with no default
  Class:   getvarError/missingArgError/error/condition
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test-add_risktable_strata_symbol.R:10:3
    2. │ └─testthat:::expect_condition_matching(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─(p + add_risktable_strata_symbol(symbol = "O")) %>% ...
    8. └─ggsurvfit::ggsurvfit_build(.)
    9.   ├─rlang::inject(...)
   10.   └─ggsurvfit:::.construct_risktable(...)
  ── Failure ('test-add_risktable_strata_symbol.R:14:3'): add_risktable_strata_symbol() works ──
  `(p + add_risktable_strata_symbol(symbol = "O")) %>% ggsurvfit_build()` threw an unexpected error.
  Message: argument "risktable_height" is missing, with no default
  Class:   getvarError/missingArgError/error/condition
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test-add_risktable_strata_symbol.R:14:3
    2. │ └─testthat:::expect_condition_matching(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─(p + add_risktable_strata_symbol(symbol = "O")) %>% ...
    8. └─ggsurvfit::ggsurvfit_build(.)
    9.   ├─rlang::inject(...)
   10.   └─ggsurvfit:::.construct_risktable(...)
  ── Error ('test-add_risktable_strata_symbol.R:32:3'): add_risktable_strata_symbol() works ──
  <getvarError/missingArgError/error/condition>
  Error in `.construct_risktable(x, geom_blank.times = NULL, geom_blank.risktable_stats = c("{n.risk}", 
  "{cum.event}"), geom_blank.stats_label = NULL, geom_blank.combine_groups = FALSE, 
      geom_blank.risktable_group = "risktable_stats", geom_blank.risktable_height = NULL, 
      geom_blank.theme = list(structure(list(line = <object>, rect = <object>, 
          text = <object>, title = <object>, point = <object>, 
          polygon = <object>, geom = <object>, spacing = structure(5.5, unit = 8L, class = c("simpleUnit", 
          "unit", "unit_v2")), margins = structure(c(5.5, 5.5, 
          5.5, 5.5), class = c("ggplot2::margin", "simpleUnit", 
          "unit", "unit_v2", "S7_object"), S7_class = structure(function (t = 0, 
              r = 0, b = 0, l = 0, unit = "pt", ...) 
          {
              warn_dots_empty()
              lens <- c(length(t), length(r), length(b), length(l))
              if (any(lens != 1)) {
                  incorrect <- c("t", "r", "b", "l")[lens != 1]
                  s <- if (length(incorrect) > 1) 
                    "s"
                  else ""
                  cli::cli_warn(c("In {.fn margin}, the argument{s} {.and {.arg {incorrect}}} should \\\n        have length 1, not length {.and {lens[lens != 1]}}.", 
                    i = "Argument{s} get(s) truncated to length 1."))
                  t <- t[1]
                  r <- r[1]
                  b <- b[1]
                  l <- l[1]
              }
              u <- unit(c(t, r, b, l), unit)
              S7::new_object(u)
          }, name = "margin", parent = structure(list(class = c("simpleUnit", 
          "unit", "unit_v2"), constructor = function (.data) 
          {
              stop(sprintf("S3 class <%s> doesn't have a constructor", 
                  class[[1]]), call. = FALSE)
          }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(), abstract = FALSE, constructor = function (t = 0, 
              r = 0, b = 0, l = 0, unit = "pt", ...) 
          {
              warn_dots_empty()
              lens <- c(length(t), length(r), length(b), length(l))
              if (any(lens != 1)) {
                  incorrect <- c("t", "r", "b", "l")[lens != 1]
                  s <- if (length(incorrect) > 1) 
                    "s"
                  else ""
                  cli::cli_warn(c("In {.fn margin}, the argument{s} {.and {.arg {incorrect}}} should \\\n        have length 1, not length {.and {lens[lens != 1]}}.", 
                    i = "Argument{s} get(s) truncated to length 1."))
                  t <- t[1]
                  r <- r[1]
                  b <- b[1]
                  l <- l[1]
              }
              u <- unit(c(t, r, b, l), unit)
              S7::new_object(u)
          }, class = c("S7_class", "S7_object")), unit = 8L), aspect.ratio = NULL, 
          axis.title = NULL, axis.title.x = <object>, axis.title.x.top = <object>, 
          axis.title.x.bottom = NULL, axis.title.y = <object>, 
          axis.title.y.left = NULL, axis.title.y.right = <object>, 
          axis.text = <object>, axis.text.x = <object>, axis.text.x.top = <object>, 
          axis.text.x.bottom = NULL, axis.text.y = <object>, axis.text.y.left = NULL, 
          axis.text.y.right = <object>, axis.text.theta = NULL, 
          axis.text.r = <object>, axis.ticks = <object>, axis.ticks.x = NULL, 
          axis.ticks.x.top = NULL, axis.ticks.x.bottom = NULL, 
          axis.ticks.y = NULL, axis.ticks.y.left = NULL, axis.ticks.y.right = NULL, 
          axis.ticks.theta = NULL, axis.ticks.r = NULL, axis.minor.ticks.x.top = NULL, 
          axis.minor.ticks.x.bottom = NULL, axis.minor.ticks.y.left = NULL, 
          axis.minor.ticks.y.right = NULL, axis.minor.ticks.theta = NULL, 
          axis.minor.ticks.r = NULL, axis.ticks.length = structure(0.5, class = "rel"), 
          axis.ticks.length.x = NULL, axis.ticks.length.x.top = NULL, 
          axis.ticks.length.x.bottom = NULL, axis.ticks.length.y = NULL, 
          axis.ticks.length.y.left = NULL, axis.ticks.length.y.right = NULL, 
          axis.ticks.length.theta = NULL, axis.ticks.length.r = NULL, 
          axis.minor.ticks.length = structure(0.75, class = "rel"), 
          axis.minor.ticks.length.x = NULL, axis.minor.ticks.length.x.top = NULL, 
          axis.minor.ticks.length.x.bottom = NULL, axis.minor.ticks.length.y = NULL, 
          axis.minor.ticks.length.y.left = NULL, axis.minor.ticks.length.y.right = NULL, 
          axis.minor.ticks.length.theta = NULL, axis.minor.ticks.length.r = NULL, 
          axis.line = <object>, axis.line.x = NULL, axis.line.x.top = NULL, 
          axis.line.x.bottom = NULL, axis.line.y = NULL, axis.line.y.left = NULL, 
          axis.line.y.right = NULL, axis.line.theta = NULL, axis.line.r = NULL, 
          legend.background = <object>, legend.margin = NULL, legend.spacing = structure(2, class = "rel"), 
          legend.spacing.x = NULL, legend.spacing.y = NULL, legend.key = NULL, 
          legend.key.size = structure(1.2, unit = 3L, class = c("simpleUnit", 
          "unit", "unit_v2")), legend.key.height = NULL, legend.key.width = NULL, 
          legend.key.spacing = NULL, legend.key.spacing.x = NULL, 
          legend.key.spacing.y = NULL, legend.key.justification = NULL, 
          legend.frame = NULL, legend.ticks = NULL, legend.ticks.length = structure(0.2, class = "rel"), 
          legend.axis.line = NULL, legend.text = <object>, legend.text.position = NULL, 
          legend.title = <object>, legend.title.position = NULL, 
          legend.position = "right", legend.position.inside = NULL, 
          legend.direction = NULL, legend.byrow = NULL, legend.justification = "center", 
          legend.justification.top = NULL, legend.justification.bottom = NULL, 
          legend.justification.left = NULL, legend.justification.right = NULL, 
          legend.justification.inside = NULL, legend.location = NULL, 
          legend.box = NULL, legend.box.just = NULL, legend.box.margin = structure(c(0, 
          0, 0, 0), class = c("ggplot2::margin", "simpleUnit", 
          "unit", "unit_v2", "S7_object"), S7_class = structure(function (t = 0, 
              r = 0, b = 0, l = 0, unit = "pt", ...) 
          {
              warn_dots_empty()
              lens <- c(length(t), length(r), length(b), length(l))
              if (any(lens != 1)) {
                  incorrect <- c("t", "r", "b", "l")[lens != 1]
                  s <- if (length(incorrect) > 1) 
                    "s"
                  else ""
                  cli::cli_warn(c("In {.fn margin}, the argument{s} {.and {.arg {incorrect}}} should \\\n        have length 1, not length {.and {lens[lens != 1]}}.", 
                    i = "Argument{s} get(s) truncated to length 1."))
                  t <- t[1]
                  r <- r[1]
                  b <- b[1]
                  l <- l[1]
              }
              u <- unit(c(t, r, b, l), unit)
              S7::new_object(u)
          }, name = "margin", parent = structure(list(class = c("simpleUnit", 
          "unit", "unit_v2"), constructor = function (.data) 
          {
              stop(sprintf("S3 class <%s> doesn't have a constructor", 
                  class[[1]]), call. = FALSE)
          }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(), abstract = FALSE, constructor = function (t = 0, 
              r = 0, b = 0, l = 0, unit = "pt", ...) 
          {
              warn_dots_empty()
              lens <- c(length(t), length(r), length(b), length(l))
              if (any(lens != 1)) {
                  incorrect <- c("t", "r", "b", "l")[lens != 1]
                  s <- if (length(incorrect) > 1) 
                    "s"
                  else ""
                  cli::cli_warn(c("In {.fn margin}, the argument{s} {.and {.arg {incorrect}}} should \\\n        have length 1, not length {.and {lens[lens != 1]}}.", 
                    i = "Argument{s} get(s) truncated to length 1."))
                  t <- t[1]
                  r <- r[1]
                  b <- b[1]
                  l <- l[1]
              }
              u <- unit(c(t, r, b, l), unit)
              S7::new_object(u)
          }, class = c("S7_class", "S7_object")), unit = 8L), legend.box.background = <object>, 
          legend.box.spacing = structure(2, class = "rel"), panel.background = <object>, 
          panel.border = <object>, panel.spacing = NULL, panel.spacing.x = NULL, 
          panel.spacing.y = NULL, panel.grid = <object>, panel.grid.major = NULL, 
          panel.grid.minor = <object>, panel.grid.major.x = NULL, 
          panel.grid.major.y = NULL, panel.grid.minor.x = NULL, 
          panel.grid.minor.y = NULL, panel.ontop = FALSE, panel.widths = NULL, 
          panel.heights = NULL, plot.background = <object>, plot.title = <object>, 
          plot.title.position = "panel", plot.subtitle = <object>, 
          plot.caption = <object>, plot.caption.position = "panel", 
          plot.tag = <object>, plot.tag.position = "topleft", plot.tag.location = NULL, 
          plot.margin = NULL, strip.background = <object>, strip.background.x = NULL, 
          strip.background.y = NULL, strip.clip = "on", strip.placement = "inside", 
          strip.text = <object>, strip.text.x = NULL, strip.text.x.bottom = NULL, 
          strip.text.x.top = NULL, strip.text.y = <object>, strip.text.y.left = <object>, 
          strip.text.y.right = NULL, strip.switch.pad.grid = structure(2.75, unit = 8L, class = c("simpleUnit", 
          "unit", "unit_v2")), strip.switch.pad.wrap = structure(2.75, unit = 8L, class = c("simpleUnit", 
          "unit", "unit_v2"))), class = c("theme", "ggplot2::theme", 
      "gg", "S7_object"), S7_class = structure(function (elements = list(), 
          ..., complete = FALSE, validate = TRUE) 
      {
          warn_dots_empty()
          S7::new_object(elements, complete = complete, validate = validate)
      }, name = "theme", parent = structure(list(class = "gg", 
          constructor = function (.data) 
          {
              stop(sprintf("S3 class <%s> doesn't have a constructor", 
                  class[[1]]), call. = FALSE)
          }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(
          complete = structure(list(name = "complete", class = structure(list(
              class = "logical", constructor_name = "logical", 
              constructor = function (.data = logical(0)) 
              .data, validator = function (object) 
              {
                  if (base_class(object) != name) {
                    sprintf("Underlying data must be <%s> not <%s>", 
                      name, base_class(object))
                  }
              }), class = "S7_base_class"), getter = NULL, setter = NULL, 
              validator = NULL, default = NULL), class = "S7_property"), 
          validate = structure(list(name = "validate", class = structure(list(
              class = "logical", constructor_name = "logical", 
              constructor = function (.data = logical(0)) 
              .data, validator = function (object) 
              {
                  if (base_class(object) != name) {
                    sprintf("Underlying data must be <%s> not <%s>", 
                      name, base_class(object))
                  }
              }), class = "S7_base_class"), getter = NULL, setter = NULL, 
              validator = NULL, default = NULL), class = "S7_property")), abstract = FALSE, constructor = function (elements = list(), 
          ..., complete = FALSE, validate = TRUE) 
      {
          warn_dots_empty()
          S7::new_object(elements, complete = complete, validate = validate)
      }, class = c("S7_class", "S7_object")), complete = TRUE, validate = TRUE), 
          structure(list(axis.title.x = <object>, axis.text.x = <object>, 
              axis.text.y = <object>, axis.ticks = <object>, axis.line = <object>, 
              legend.position = "none", panel.border = <object>, 
              panel.grid.major = <object>, panel.grid.minor = <object>, 
              plot.title = <object>, plot.margin = structure(c(0, 
              5.5, 0, 5.5), unit = 8L, class = c("simpleUnit", 
              "unit", "unit_v2"))), class = c("theme", "ggplot2::theme", 
          "gg", "S7_object"), S7_class = structure(function (elements = list(), 
              ..., complete = FALSE, validate = TRUE) 
          {
              warn_dots_empty()
              S7::new_object(elements, complete = complete, validate = validate)
          }, name = "theme", parent = structure(list(class = "gg", 
              constructor = function (.data) 
              {
                  stop(sprintf("S3 class <%s> doesn't have a constructor", 
                    class[[1]]), call. = FALSE)
              }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(
              complete = structure(list(name = "complete", class = structure(list(
                  class = "logical", constructor_name = "logical", 
                  constructor = function (.data = logical(0)) 
                  .data, validator = function (object) 
                  {
                    if (base_class(object) != name) {
                      sprintf("Underlying data must be <%s> not <%s>", 
                        name, base_class(object))
                    }
                  }), class = "S7_base_class"), getter = NULL, 
                  setter = NULL, validator = NULL, default = NULL), class = "S7_property"), 
              validate = structure(list(name = "validate", class = structure(list(
                  class = "logical", constructor_name = "logical", 
                  constructor = function (.data = logical(0)) 
                  .data, validator = function (object) 
                  {
                    if (base_class(object) != name) {
                      sprintf("Underlying data must be <%s> not <%s>", 
                        name, base_class(object))
                    }
                  }), class = "S7_base_class"), getter = NULL, 
                  setter = NULL, validator = NULL, default = NULL), class = "S7_property")), abstract = FALSE, constructor = function (elements = list(), 
              ..., complete = FALSE, validate = TRUE) 
          {
              warn_dots_empty()
              S7::new_object(elements, complete = complete, validate = validate)
          }, class = c("S7_class", "S7_object")), complete = FALSE, validate = TRUE), 
          structure(list(x = NULL), class = c("ggplot2::labels", 
          "gg", "S7_object"), S7_class = structure(function (labels = list(), 
              ...) 
          {
              warn_dots_empty()
              S7::new_object(labels)
          }, name = "labels", parent = structure(list(class = "gg", 
              constructor = function (.data) 
              {
                  stop(sprintf("S3 class <%s> doesn't have a constructor", 
                    class[[1]]), call. = FALSE)
              }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(), abstract = FALSE, constructor = function (labels = list(), 
              ...) 
          {
              warn_dots_empty()
              S7::new_object(labels)
          }, validator = function (self) 
          {
              if (!is.list(self)) {
                  return("labels must be a list.")
              }
              if (!is_named2(self)) {
                  return("every label must be named.")
              }
              dups <- unique(names(self)[duplicated(names(self))])
              if (length(dups) > 0) {
                  dups <- oxford_comma(dups, final = "and")
                  return(paste0("labels cannot contain duplicate names (", 
                    dups, ")."))
              }
              return(NULL)
          }, class = c("S7_class", "S7_object"))), structure(list(
              y = NULL), class = c("ggplot2::labels", "gg", "S7_object"
          ), S7_class = structure(function (labels = list(), ...) 
          {
              warn_dots_empty()
              S7::new_object(labels)
          }, name = "labels", parent = structure(list(class = "gg", 
              constructor = function (.data) 
              {
                  stop(sprintf("S3 class <%s> doesn't have a constructor", 
                    class[[1]]), call. = FALSE)
              }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(), abstract = FALSE, constructor = function (labels = list(), 
              ...) 
          {
              warn_dots_empty()
              S7::new_object(labels)
          }, validator = function (self) 
          {
              if (!is.list(self)) {
                  return("labels must be a list.")
              }
              if (!is_named2(self)) {
                  return("every label must be named.")
              }
              dups <- unique(names(self)[duplicated(names(self))])
              if (length(dups) > 0) {
                  dups <- oxford_comma(dups, final = "and")
                  return(paste0("labels cannot contain duplicate names (", 
                    dups, ")."))
              }
              return(NULL)
          }, class = c("S7_class", "S7_object")))), geom_blank.size = 3.5, 
      combine_plots = combine_plots, risktable_symbol_args = risktable_symbol_args)`: argument "risktable_height" is missing, with no default
  Backtrace:
      ▆
   1. └─vdiffr::expect_doppelganger(...) at test-add_risktable_strata_symbol.R:32:3
   2.   └─vdiffr (local) writer(fig, testcase, title)
   3.     ├─vdiffr:::print_plot(plot, title)
   4.     └─vdiffr:::print_plot.ggplot(plot, title)
   5.       ├─base::print(p)
   6.       └─ggsurvfit:::print.ggsurvfit(p)
   7.         └─ggsurvfit::ggsurvfit_build(x, combine_plots = TRUE)
   8.           ├─rlang::inject(...)
   9.           └─ggsurvfit:::.construct_risktable(...)
  ── Error ('test-add_risktable_strata_symbol.R:56:3'): add_risktable_strata_symbol() messaging works ──
  <getvarError/missingArgError/error/condition>
  Error in `.construct_risktable(x, geom_blank.times = NULL, geom_blank.risktable_stats = c("{n.risk}", 
  "{cum.event}"), geom_blank.stats_label = NULL, geom_blank.combine_groups = FALSE, 
      geom_blank.risktable_group = "auto", geom_blank.risktable_height = NULL, 
      geom_blank.theme = list(structure(list(line = <object>, rect = <object>, 
          text = <object>, title = <object>, point = <object>, 
          polygon = <object>, geom = <object>, spacing = structure(5.5, unit = 8L, class = c("simpleUnit", 
          "unit", "unit_v2")), margins = structure(c(5.5, 5.5, 
          5.5, 5.5), class = c("ggplot2::margin", "simpleUnit", 
          "unit", "unit_v2", "S7_object"), S7_class = structure(function (t = 0, 
              r = 0, b = 0, l = 0, unit = "pt", ...) 
          {
              warn_dots_empty()
              lens <- c(length(t), length(r), length(b), length(l))
              if (any(lens != 1)) {
                  incorrect <- c("t", "r", "b", "l")[lens != 1]
                  s <- if (length(incorrect) > 1) 
                    "s"
                  else ""
                  cli::cli_warn(c("In {.fn margin}, the argument{s} {.and {.arg {incorrect}}} should \\\n        have length 1, not length {.and {lens[lens != 1]}}.", 
                    i = "Argument{s} get(s) truncated to length 1."))
                  t <- t[1]
                  r <- r[1]
                  b <- b[1]
                  l <- l[1]
              }
              u <- unit(c(t, r, b, l), unit)
              S7::new_object(u)
          }, name = "margin", parent = structure(list(class = c("simpleUnit", 
          "unit", "unit_v2"), constructor = function (.data) 
          {
              stop(sprintf("S3 class <%s> doesn't have a constructor", 
                  class[[1]]), call. = FALSE)
          }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(), abstract = FALSE, constructor = function (t = 0, 
              r = 0, b = 0, l = 0, unit = "pt", ...) 
          {
              warn_dots_empty()
              lens <- c(length(t), length(r), length(b), length(l))
              if (any(lens != 1)) {
                  incorrect <- c("t", "r", "b", "l")[lens != 1]
                  s <- if (length(incorrect) > 1) 
                    "s"
                  else ""
                  cli::cli_warn(c("In {.fn margin}, the argument{s} {.and {.arg {incorrect}}} should \\\n        have length 1, not length {.and {lens[lens != 1]}}.", 
                    i = "Argument{s} get(s) truncated to length 1."))
                  t <- t[1]
                  r <- r[1]
                  b <- b[1]
                  l <- l[1]
              }
              u <- unit(c(t, r, b, l), unit)
              S7::new_object(u)
          }, class = c("S7_class", "S7_object")), unit = 8L), aspect.ratio = NULL, 
          axis.title = NULL, axis.title.x = <object>, axis.title.x.top = <object>, 
          axis.title.x.bottom = NULL, axis.title.y = <object>, 
          axis.title.y.left = NULL, axis.title.y.right = <object>, 
          axis.text = <object>, axis.text.x = <object>, axis.text.x.top = <object>, 
          axis.text.x.bottom = NULL, axis.text.y = <object>, axis.text.y.left = NULL, 
          axis.text.y.right = <object>, axis.text.theta = NULL, 
          axis.text.r = <object>, axis.ticks = <object>, axis.ticks.x = NULL, 
          axis.ticks.x.top = NULL, axis.ticks.x.bottom = NULL, 
          axis.ticks.y = NULL, axis.ticks.y.left = NULL, axis.ticks.y.right = NULL, 
          axis.ticks.theta = NULL, axis.ticks.r = NULL, axis.minor.ticks.x.top = NULL, 
          axis.minor.ticks.x.bottom = NULL, axis.minor.ticks.y.left = NULL, 
          axis.minor.ticks.y.right = NULL, axis.minor.ticks.theta = NULL, 
          axis.minor.ticks.r = NULL, axis.ticks.length = structure(0.5, class = "rel"), 
          axis.ticks.length.x = NULL, axis.ticks.length.x.top = NULL, 
          axis.ticks.length.x.bottom = NULL, axis.ticks.length.y = NULL, 
          axis.ticks.length.y.left = NULL, axis.ticks.length.y.right = NULL, 
          axis.ticks.length.theta = NULL, axis.ticks.length.r = NULL, 
          axis.minor.ticks.length = structure(0.75, class = "rel"), 
          axis.minor.ticks.length.x = NULL, axis.minor.ticks.length.x.top = NULL, 
          axis.minor.ticks.length.x.bottom = NULL, axis.minor.ticks.length.y = NULL, 
          axis.minor.ticks.length.y.left = NULL, axis.minor.ticks.length.y.right = NULL, 
          axis.minor.ticks.length.theta = NULL, axis.minor.ticks.length.r = NULL, 
          axis.line = <object>, axis.line.x = NULL, axis.line.x.top = NULL, 
          axis.line.x.bottom = NULL, axis.line.y = NULL, axis.line.y.left = NULL, 
          axis.line.y.right = NULL, axis.line.theta = NULL, axis.line.r = NULL, 
          legend.background = <object>, legend.margin = NULL, legend.spacing = structure(2, class = "rel"), 
          legend.spacing.x = NULL, legend.spacing.y = NULL, legend.key = NULL, 
          legend.key.size = structure(1.2, unit = 3L, class = c("simpleUnit", 
          "unit", "unit_v2")), legend.key.height = NULL, legend.key.width = NULL, 
          legend.key.spacing = NULL, legend.key.spacing.x = NULL, 
          legend.key.spacing.y = NULL, legend.key.justification = NULL, 
          legend.frame = NULL, legend.ticks = NULL, legend.ticks.length = structure(0.2, class = "rel"), 
          legend.axis.line = NULL, legend.text = <object>, legend.text.position = NULL, 
          legend.title = <object>, legend.title.position = NULL, 
          legend.position = "right", legend.position.inside = NULL, 
          legend.direction = NULL, legend.byrow = NULL, legend.justification = "center", 
          legend.justification.top = NULL, legend.justification.bottom = NULL, 
          legend.justification.left = NULL, legend.justification.right = NULL, 
          legend.justification.inside = NULL, legend.location = NULL, 
          legend.box = NULL, legend.box.just = NULL, legend.box.margin = structure(c(0, 
          0, 0, 0), class = c("ggplot2::margin", "simpleUnit", 
          "unit", "unit_v2", "S7_object"), S7_class = structure(function (t = 0, 
              r = 0, b = 0, l = 0, unit = "pt", ...) 
          {
              warn_dots_empty()
              lens <- c(length(t), length(r), length(b), length(l))
              if (any(lens != 1)) {
                  incorrect <- c("t", "r", "b", "l")[lens != 1]
                  s <- if (length(incorrect) > 1) 
                    "s"
                  else ""
                  cli::cli_warn(c("In {.fn margin}, the argument{s} {.and {.arg {incorrect}}} should \\\n        have length 1, not length {.and {lens[lens != 1]}}.", 
                    i = "Argument{s} get(s) truncated to length 1."))
                  t <- t[1]
                  r <- r[1]
                  b <- b[1]
                  l <- l[1]
              }
              u <- unit(c(t, r, b, l), unit)
              S7::new_object(u)
          }, name = "margin", parent = structure(list(class = c("simpleUnit", 
          "unit", "unit_v2"), constructor = function (.data) 
          {
              stop(sprintf("S3 class <%s> doesn't have a constructor", 
                  class[[1]]), call. = FALSE)
          }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(), abstract = FALSE, constructor = function (t = 0, 
              r = 0, b = 0, l = 0, unit = "pt", ...) 
          {
              warn_dots_empty()
              lens <- c(length(t), length(r), length(b), length(l))
              if (any(lens != 1)) {
                  incorrect <- c("t", "r", "b", "l")[lens != 1]
                  s <- if (length(incorrect) > 1) 
                    "s"
                  else ""
                  cli::cli_warn(c("In {.fn margin}, the argument{s} {.and {.arg {incorrect}}} should \\\n        have length 1, not length {.and {lens[lens != 1]}}.", 
                    i = "Argument{s} get(s) truncated to length 1."))
                  t <- t[1]
                  r <- r[1]
                  b <- b[1]
                  l <- l[1]
              }
              u <- unit(c(t, r, b, l), unit)
              S7::new_object(u)
          }, class = c("S7_class", "S7_object")), unit = 8L), legend.box.background = <object>, 
          legend.box.spacing = structure(2, class = "rel"), panel.background = <object>, 
          panel.border = <object>, panel.spacing = NULL, panel.spacing.x = NULL, 
          panel.spacing.y = NULL, panel.grid = <object>, panel.grid.major = NULL, 
          panel.grid.minor = <object>, panel.grid.major.x = NULL, 
          panel.grid.major.y = NULL, panel.grid.minor.x = NULL, 
          panel.grid.minor.y = NULL, panel.ontop = FALSE, panel.widths = NULL, 
          panel.heights = NULL, plot.background = <object>, plot.title = <object>, 
          plot.title.position = "panel", plot.subtitle = <object>, 
          plot.caption = <object>, plot.caption.position = "panel", 
          plot.tag = <object>, plot.tag.position = "topleft", plot.tag.location = NULL, 
          plot.margin = NULL, strip.background = <object>, strip.background.x = NULL, 
          strip.background.y = NULL, strip.clip = "on", strip.placement = "inside", 
          strip.text = <object>, strip.text.x = NULL, strip.text.x.bottom = NULL, 
          strip.text.x.top = NULL, strip.text.y = <object>, strip.text.y.left = <object>, 
          strip.text.y.right = NULL, strip.switch.pad.grid = structure(2.75, unit = 8L, class = c("simpleUnit", 
          "unit", "unit_v2")), strip.switch.pad.wrap = structure(2.75, unit = 8L, class = c("simpleUnit", 
          "unit", "unit_v2"))), class = c("theme", "ggplot2::theme", 
      "gg", "S7_object"), S7_class = structure(function (elements = list(), 
          ..., complete = FALSE, validate = TRUE) 
      {
          warn_dots_empty()
          S7::new_object(elements, complete = complete, validate = validate)
      }, name = "theme", parent = structure(list(class = "gg", 
          constructor = function (.data) 
          {
              stop(sprintf("S3 class <%s> doesn't have a constructor", 
                  class[[1]]), call. = FALSE)
          }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(
          complete = structure(list(name = "complete", class = structure(list(
              class = "logical", constructor_name = "logical", 
              constructor = function (.data = logical(0)) 
              .data, validator = function (object) 
              {
                  if (base_class(object) != name) {
                    sprintf("Underlying data must be <%s> not <%s>", 
                      name, base_class(object))
                  }
              }), class = "S7_base_class"), getter = NULL, setter = NULL, 
              validator = NULL, default = NULL), class = "S7_property"), 
          validate = structure(list(name = "validate", class = structure(list(
              class = "logical", constructor_name = "logical", 
              constructor = function (.data = logical(0)) 
              .data, validator = function (object) 
              {
                  if (base_class(object) != name) {
                    sprintf("Underlying data must be <%s> not <%s>", 
                      name, base_class(object))
                  }
              }), class = "S7_base_class"), getter = NULL, setter = NULL, 
              validator = NULL, default = NULL), class = "S7_property")), abstract = FALSE, constructor = function (elements = list(), 
          ..., complete = FALSE, validate = TRUE) 
      {
          warn_dots_empty()
          S7::new_object(elements, complete = complete, validate = validate)
      }, class = c("S7_class", "S7_object")), complete = TRUE, validate = TRUE), 
          structure(list(axis.title.x = <object>, axis.text.x = <object>, 
              axis.text.y = <object>, axis.ticks = <object>, axis.line = <object>, 
              legend.position = "none", panel.border = <object>, 
              panel.grid.major = <object>, panel.grid.minor = <object>, 
              plot.title = <object>, plot.margin = structure(c(0, 
              5.5, 0, 5.5), unit = 8L, class = c("simpleUnit", 
              "unit", "unit_v2"))), class = c("theme", "ggplot2::theme", 
          "gg", "S7_object"), S7_class = structure(function (elements = list(), 
              ..., complete = FALSE, validate = TRUE) 
          {
              warn_dots_empty()
              S7::new_object(elements, complete = complete, validate = validate)
          }, name = "theme", parent = structure(list(class = "gg", 
              constructor = function (.data) 
              {
                  stop(sprintf("S3 class <%s> doesn't have a constructor", 
                    class[[1]]), call. = FALSE)
              }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(
              complete = structure(list(name = "complete", class = structure(list(
                  class = "logical", constructor_name = "logical", 
                  constructor = function (.data = logical(0)) 
                  .data, validator = function (object) 
                  {
                    if (base_class(object) != name) {
                      sprintf("Underlying data must be <%s> not <%s>", 
                        name, base_class(object))
                    }
                  }), class = "S7_base_class"), getter = NULL, 
                  setter = NULL, validator = NULL, default = NULL), class = "S7_property"), 
              validate = structure(list(name = "validate", class = structure(list(
                  class = "logical", constructor_name = "logical", 
                  constructor = function (.data = logical(0)) 
                  .data, validator = function (object) 
                  {
                    if (base_class(object) != name) {
                      sprintf("Underlying data must be <%s> not <%s>", 
                        name, base_class(object))
                    }
                  }), class = "S7_base_class"), getter = NULL, 
                  setter = NULL, validator = NULL, default = NULL), class = "S7_property")), abstract = FALSE, constructor = function (elements = list(), 
              ..., complete = FALSE, validate = TRUE) 
          {
              warn_dots_empty()
              S7::new_object(elements, complete = complete, validate = validate)
          }, class = c("S7_class", "S7_object")), complete = FALSE, validate = TRUE), 
          structure(list(x = NULL), class = c("ggplot2::labels", 
          "gg", "S7_object"), S7_class = structure(function (labels = list(), 
              ...) 
          {
              warn_dots_empty()
              S7::new_object(labels)
          }, name = "labels", parent = structure(list(class = "gg", 
              constructor = function (.data) 
              {
                  stop(sprintf("S3 class <%s> doesn't have a constructor", 
                    class[[1]]), call. = FALSE)
              }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(), abstract = FALSE, constructor = function (labels = list(), 
              ...) 
          {
              warn_dots_empty()
              S7::new_object(labels)
          }, validator = function (self) 
          {
              if (!is.list(self)) {
                  return("labels must be a list.")
              }
              if (!is_named2(self)) {
                  return("every label must be named.")
              }
              dups <- unique(names(self)[duplicated(names(self))])
              if (length(dups) > 0) {
                  dups <- oxford_comma(dups, final = "and")
                  return(paste0("labels cannot contain duplicate names (", 
                    dups, ")."))
              }
              return(NULL)
          }, class = c("S7_class", "S7_object"))), structure(list(
              y = NULL), class = c("ggplot2::labels", "gg", "S7_object"
          ), S7_class = structure(function (labels = list(), ...) 
          {
              warn_dots_empty()
              S7::new_object(labels)
          }, name = "labels", parent = structure(list(class = "gg", 
              constructor = function (.data) 
              {
                  stop(sprintf("S3 class <%s> doesn't have a constructor", 
                    class[[1]]), call. = FALSE)
              }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(), abstract = FALSE, constructor = function (labels = list(), 
              ...) 
          {
              warn_dots_empty()
              S7::new_object(labels)
          }, validator = function (self) 
          {
              if (!is.list(self)) {
                  return("labels must be a list.")
              }
              if (!is_named2(self)) {
                  return("every label must be named.")
              }
              dups <- unique(names(self)[duplicated(names(self))])
              if (length(dups) > 0) {
                  dups <- oxford_comma(dups, final = "and")
                  return(paste0("labels cannot contain duplicate names (", 
                    dups, ")."))
              }
              return(NULL)
          }, class = c("S7_class", "S7_object")))), geom_blank.size = 3.5, 
      combine_plots = combine_plots, risktable_symbol_args = risktable_symbol_args)`: argument "risktable_height" is missing, with no default
  Backtrace:
       ▆
    1. ├─testthat::expect_message(...) at test-add_risktable_strata_symbol.R:56:3
    2. │ └─testthat:::expect_condition_matching(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─base::print(...)
    8. └─ggsurvfit:::print.ggsurvfit(...)
    9.   └─ggsurvfit::ggsurvfit_build(x, combine_plots = TRUE)
   10.     ├─rlang::inject(...)
   11.     └─ggsurvfit:::.construct_risktable(...)
  ── Error ('test-ggsurvfit.R:193:3'): ggsurvfit() works with geoms with new data ──
  <getvarError/missingArgError/error/condition>
  Error in `.construct_risktable(x, geom_blank.times = NULL, geom_blank.risktable_stats = c("{n.risk}", 
  "{cum.event}"), geom_blank.stats_label = NULL, geom_blank.combine_groups = FALSE, 
      geom_blank.risktable_group = "risktable_stats", geom_blank.risktable_height = NULL, 
      geom_blank.theme = list(structure(list(line = <object>, rect = <object>, 
          text = <object>, title = <object>, point = <object>, 
          polygon = <object>, geom = <object>, spacing = structure(5.5, unit = 8L, class = c("simpleUnit", 
          "unit", "unit_v2")), margins = structure(c(5.5, 5.5, 
          5.5, 5.5), class = c("ggplot2::margin", "simpleUnit", 
          "unit", "unit_v2", "S7_object"), S7_class = structure(function (t = 0, 
              r = 0, b = 0, l = 0, unit = "pt", ...) 
          {
              warn_dots_empty()
              lens <- c(length(t), length(r), length(b), length(l))
              if (any(lens != 1)) {
                  incorrect <- c("t", "r", "b", "l")[lens != 1]
                  s <- if (length(incorrect) > 1) 
                    "s"
                  else ""
                  cli::cli_warn(c("In {.fn margin}, the argument{s} {.and {.arg {incorrect}}} should \\\n        have length 1, not length {.and {lens[lens != 1]}}.", 
                    i = "Argument{s} get(s) truncated to length 1."))
                  t <- t[1]
                  r <- r[1]
                  b <- b[1]
                  l <- l[1]
              }
              u <- unit(c(t, r, b, l), unit)
              S7::new_object(u)
          }, name = "margin", parent = structure(list(class = c("simpleUnit", 
          "unit", "unit_v2"), constructor = function (.data) 
          {
              stop(sprintf("S3 class <%s> doesn't have a constructor", 
                  class[[1]]), call. = FALSE)
          }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(), abstract = FALSE, constructor = function (t = 0, 
              r = 0, b = 0, l = 0, unit = "pt", ...) 
          {
              warn_dots_empty()
              lens <- c(length(t), length(r), length(b), length(l))
              if (any(lens != 1)) {
                  incorrect <- c("t", "r", "b", "l")[lens != 1]
                  s <- if (length(incorrect) > 1) 
                    "s"
                  else ""
                  cli::cli_warn(c("In {.fn margin}, the argument{s} {.and {.arg {incorrect}}} should \\\n        have length 1, not length {.and {lens[lens != 1]}}.", 
                    i = "Argument{s} get(s) truncated to length 1."))
                  t <- t[1]
                  r <- r[1]
                  b <- b[1]
                  l <- l[1]
              }
              u <- unit(c(t, r, b, l), unit)
              S7::new_object(u)
          }, class = c("S7_class", "S7_object")), unit = 8L), aspect.ratio = NULL, 
          axis.title = NULL, axis.title.x = <object>, axis.title.x.top = <object>, 
          axis.title.x.bottom = NULL, axis.title.y = <object>, 
          axis.title.y.left = NULL, axis.title.y.right = <object>, 
          axis.text = <object>, axis.text.x = <object>, axis.text.x.top = <object>, 
          axis.text.x.bottom = NULL, axis.text.y = <object>, axis.text.y.left = NULL, 
          axis.text.y.right = <object>, axis.text.theta = NULL, 
          axis.text.r = <object>, axis.ticks = <object>, axis.ticks.x = NULL, 
          axis.ticks.x.top = NULL, axis.ticks.x.bottom = NULL, 
          axis.ticks.y = NULL, axis.ticks.y.left = NULL, axis.ticks.y.right = NULL, 
          axis.ticks.theta = NULL, axis.ticks.r = NULL, axis.minor.ticks.x.top = NULL, 
          axis.minor.ticks.x.bottom = NULL, axis.minor.ticks.y.left = NULL, 
          axis.minor.ticks.y.right = NULL, axis.minor.ticks.theta = NULL, 
          axis.minor.ticks.r = NULL, axis.ticks.length = structure(0.5, class = "rel"), 
          axis.ticks.length.x = NULL, axis.ticks.length.x.top = NULL, 
          axis.ticks.length.x.bottom = NULL, axis.ticks.length.y = NULL, 
          axis.ticks.length.y.left = NULL, axis.ticks.length.y.right = NULL, 
          axis.ticks.length.theta = NULL, axis.ticks.length.r = NULL, 
          axis.minor.ticks.length = structure(0.75, class = "rel"), 
          axis.minor.ticks.length.x = NULL, axis.minor.ticks.length.x.top = NULL, 
          axis.minor.ticks.length.x.bottom = NULL, axis.minor.ticks.length.y = NULL, 
          axis.minor.ticks.length.y.left = NULL, axis.minor.ticks.length.y.right = NULL, 
          axis.minor.ticks.length.theta = NULL, axis.minor.ticks.length.r = NULL, 
          axis.line = <object>, axis.line.x = NULL, axis.line.x.top = NULL, 
          axis.line.x.bottom = NULL, axis.line.y = NULL, axis.line.y.left = NULL, 
          axis.line.y.right = NULL, axis.line.theta = NULL, axis.line.r = NULL, 
          legend.background = <object>, legend.margin = NULL, legend.spacing = structure(2, class = "rel"), 
          legend.spacing.x = NULL, legend.spacing.y = NULL, legend.key = NULL, 
          legend.key.size = structure(1.2, unit = 3L, class = c("simpleUnit", 
          "unit", "unit_v2")), legend.key.height = NULL, legend.key.width = NULL, 
          legend.key.spacing = NULL, legend.key.spacing.x = NULL, 
          legend.key.spacing.y = NULL, legend.key.justification = NULL, 
          legend.frame = NULL, legend.ticks = NULL, legend.ticks.length = structure(0.2, class = "rel"), 
          legend.axis.line = NULL, legend.text = <object>, legend.text.position = NULL, 
          legend.title = <object>, legend.title.position = NULL, 
          legend.position = "right", legend.position.inside = NULL, 
          legend.direction = NULL, legend.byrow = NULL, legend.justification = "center", 
          legend.justification.top = NULL, legend.justification.bottom = NULL, 
          legend.justification.left = NULL, legend.justification.right = NULL, 
          legend.justification.inside = NULL, legend.location = NULL, 
          legend.box = NULL, legend.box.just = NULL, legend.box.margin = structure(c(0, 
          0, 0, 0), class = c("ggplot2::margin", "simpleUnit", 
          "unit", "unit_v2", "S7_object"), S7_class = structure(function (t = 0, 
              r = 0, b = 0, l = 0, unit = "pt", ...) 
          {
              warn_dots_empty()
              lens <- c(length(t), length(r), length(b), length(l))
              if (any(lens != 1)) {
                  incorrect <- c("t", "r", "b", "l")[lens != 1]
                  s <- if (length(incorrect) > 1) 
                    "s"
                  else ""
                  cli::cli_warn(c("In {.fn margin}, the argument{s} {.and {.arg {incorrect}}} should \\\n        have length 1, not length {.and {lens[lens != 1]}}.", 
                    i = "Argument{s} get(s) truncated to length 1."))
                  t <- t[1]
                  r <- r[1]
                  b <- b[1]
                  l <- l[1]
              }
              u <- unit(c(t, r, b, l), unit)
              S7::new_object(u)
          }, name = "margin", parent = structure(list(class = c("simpleUnit", 
          "unit", "unit_v2"), constructor = function (.data) 
          {
              stop(sprintf("S3 class <%s> doesn't have a constructor", 
                  class[[1]]), call. = FALSE)
          }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(), abstract = FALSE, constructor = function (t = 0, 
              r = 0, b = 0, l = 0, unit = "pt", ...) 
          {
              warn_dots_empty()
              lens <- c(length(t), length(r), length(b), length(l))
              if (any(lens != 1)) {
                  incorrect <- c("t", "r", "b", "l")[lens != 1]
                  s <- if (length(incorrect) > 1) 
                    "s"
                  else ""
                  cli::cli_warn(c("In {.fn margin}, the argument{s} {.and {.arg {incorrect}}} should \\\n        have length 1, not length {.and {lens[lens != 1]}}.", 
                    i = "Argument{s} get(s) truncated to length 1."))
                  t <- t[1]
                  r <- r[1]
                  b <- b[1]
                  l <- l[1]
              }
              u <- unit(c(t, r, b, l), unit)
              S7::new_object(u)
          }, class = c("S7_class", "S7_object")), unit = 8L), legend.box.background = <object>, 
          legend.box.spacing = structure(2, class = "rel"), panel.background = <object>, 
          panel.border = <object>, panel.spacing = NULL, panel.spacing.x = NULL, 
          panel.spacing.y = NULL, panel.grid = <object>, panel.grid.major = NULL, 
          panel.grid.minor = <object>, panel.grid.major.x = NULL, 
          panel.grid.major.y = NULL, panel.grid.minor.x = NULL, 
          panel.grid.minor.y = NULL, panel.ontop = FALSE, panel.widths = NULL, 
          panel.heights = NULL, plot.background = <object>, plot.title = <object>, 
          plot.title.position = "panel", plot.subtitle = <object>, 
          plot.caption = <object>, plot.caption.position = "panel", 
          plot.tag = <object>, plot.tag.position = "topleft", plot.tag.location = NULL, 
          plot.margin = NULL, strip.background = <object>, strip.background.x = NULL, 
          strip.background.y = NULL, strip.clip = "on", strip.placement = "inside", 
          strip.text = <object>, strip.text.x = NULL, strip.text.x.bottom = NULL, 
          strip.text.x.top = NULL, strip.text.y = <object>, strip.text.y.left = <object>, 
          strip.text.y.right = NULL, strip.switch.pad.grid = structure(2.75, unit = 8L, class = c("simpleUnit", 
          "unit", "unit_v2")), strip.switch.pad.wrap = structure(2.75, unit = 8L, class = c("simpleUnit", 
          "unit", "unit_v2"))), class = c("theme", "ggplot2::theme", 
      "gg", "S7_object"), S7_class = structure(function (elements = list(), 
          ..., complete = FALSE, validate = TRUE) 
      {
          warn_dots_empty()
          S7::new_object(elements, complete = complete, validate = validate)
      }, name = "theme", parent = structure(list(class = "gg", 
          constructor = function (.data) 
          {
              stop(sprintf("S3 class <%s> doesn't have a constructor", 
                  class[[1]]), call. = FALSE)
          }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(
          complete = structure(list(name = "complete", class = structure(list(
              class = "logical", constructor_name = "logical", 
              constructor = function (.data = logical(0)) 
              .data, validator = function (object) 
              {
                  if (base_class(object) != name) {
                    sprintf("Underlying data must be <%s> not <%s>", 
                      name, base_class(object))
                  }
              }), class = "S7_base_class"), getter = NULL, setter = NULL, 
              validator = NULL, default = NULL), class = "S7_property"), 
          validate = structure(list(name = "validate", class = structure(list(
              class = "logical", constructor_name = "logical", 
              constructor = function (.data = logical(0)) 
              .data, validator = function (object) 
              {
                  if (base_class(object) != name) {
                    sprintf("Underlying data must be <%s> not <%s>", 
                      name, base_class(object))
                  }
              }), class = "S7_base_class"), getter = NULL, setter = NULL, 
              validator = NULL, default = NULL), class = "S7_property")), abstract = FALSE, constructor = function (elements = list(), 
          ..., complete = FALSE, validate = TRUE) 
      {
          warn_dots_empty()
          S7::new_object(elements, complete = complete, validate = validate)
      }, class = c("S7_class", "S7_object")), complete = TRUE, validate = TRUE), 
          structure(list(axis.title.x = <object>, axis.text.x = <object>, 
              axis.text.y = <object>, axis.ticks = <object>, axis.line = <object>, 
              legend.position = "none", panel.border = <object>, 
              panel.grid.major = <object>, panel.grid.minor = <object>, 
              plot.title = <object>, plot.margin = structure(c(0, 
              5.5, 0, 5.5), unit = 8L, class = c("simpleUnit", 
              "unit", "unit_v2"))), class = c("theme", "ggplot2::theme", 
          "gg", "S7_object"), S7_class = structure(function (elements = list(), 
              ..., complete = FALSE, validate = TRUE) 
          {
              warn_dots_empty()
              S7::new_object(elements, complete = complete, validate = validate)
          }, name = "theme", parent = structure(list(class = "gg", 
              constructor = function (.data) 
              {
                  stop(sprintf("S3 class <%s> doesn't have a constructor", 
                    class[[1]]), call. = FALSE)
              }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(
              complete = structure(list(name = "complete", class = structure(list(
                  class = "logical", constructor_name = "logical", 
                  constructor = function (.data = logical(0)) 
                  .data, validator = function (object) 
                  {
                    if (base_class(object) != name) {
                      sprintf("Underlying data must be <%s> not <%s>", 
                        name, base_class(object))
                    }
                  }), class = "S7_base_class"), getter = NULL, 
                  setter = NULL, validator = NULL, default = NULL), class = "S7_property"), 
              validate = structure(list(name = "validate", class = structure(list(
                  class = "logical", constructor_name = "logical", 
                  constructor = function (.data = logical(0)) 
                  .data, validator = function (object) 
                  {
                    if (base_class(object) != name) {
                      sprintf("Underlying data must be <%s> not <%s>", 
                        name, base_class(object))
                    }
                  }), class = "S7_base_class"), getter = NULL, 
                  setter = NULL, validator = NULL, default = NULL), class = "S7_property")), abstract = FALSE, constructor = function (elements = list(), 
              ..., complete = FALSE, validate = TRUE) 
          {
              warn_dots_empty()
              S7::new_object(elements, complete = complete, validate = validate)
          }, class = c("S7_class", "S7_object")), complete = FALSE, validate = TRUE), 
          structure(list(x = NULL), class = c("ggplot2::labels", 
          "gg", "S7_object"), S7_class = structure(function (labels = list(), 
              ...) 
          {
              warn_dots_empty()
              S7::new_object(labels)
          }, name = "labels", parent = structure(list(class = "gg", 
              constructor = function (.data) 
              {
                  stop(sprintf("S3 class <%s> doesn't have a constructor", 
                    class[[1]]), call. = FALSE)
              }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(), abstract = FALSE, constructor = function (labels = list(), 
              ...) 
          {
              warn_dots_empty()
              S7::new_object(labels)
          }, validator = function (self) 
          {
              if (!is.list(self)) {
                  return("labels must be a list.")
              }
              if (!is_named2(self)) {
                  return("every label must be named.")
              }
              dups <- unique(names(self)[duplicated(names(self))])
              if (length(dups) > 0) {
                  dups <- oxford_comma(dups, final = "and")
                  return(paste0("labels cannot contain duplicate names (", 
                    dups, ")."))
              }
              return(NULL)
          }, class = c("S7_class", "S7_object"))), structure(list(
              y = NULL), class = c("ggplot2::labels", "gg", "S7_object"
          ), S7_class = structure(function (labels = list(), ...) 
          {
              warn_dots_empty()
              S7::new_object(labels)
          }, name = "labels", parent = structure(list(class = "gg", 
              constructor = function (.data) 
              {
                  stop(sprintf("S3 class <%s> doesn't have a constructor", 
                    class[[1]]), call. = FALSE)
              }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(), abstract = FALSE, constructor = function (labels = list(), 
              ...) 
          {
              warn_dots_empty()
              S7::new_object(labels)
          }, validator = function (self) 
          {
              if (!is.list(self)) {
                  return("labels must be a list.")
              }
              if (!is_named2(self)) {
                  return("every label must be named.")
              }
              dups <- unique(names(self)[duplicated(names(self))])
              if (length(dups) > 0) {
                  dups <- oxford_comma(dups, final = "and")
                  return(paste0("labels cannot contain duplicate names (", 
                    dups, ")."))
              }
              return(NULL)
          }, class = c("S7_class", "S7_object")))), geom_blank.size = 3.5, 
      combine_plots = combine_plots, risktable_symbol_args = risktable_symbol_args)`: argument "risktable_height" is missing, with no default
  Backtrace:
      ▆
   1. └─vdiffr::expect_doppelganger("sf2-ggsurvfit_new_data_geom1", p1) at test-ggsurvfit.R:193:3
   2.   └─vdiffr (local) writer(fig, testcase, title)
   3.     ├─vdiffr:::print_plot(plot, title)
   4.     └─vdiffr:::print_plot.ggplot(plot, title)
   5.       ├─base::print(p)
   6.       └─ggsurvfit:::print.ggsurvfit(p)
   7.         └─ggsurvfit::ggsurvfit_build(x, combine_plots = TRUE)
   8.           ├─rlang::inject(...)
   9.           └─ggsurvfit:::.construct_risktable(...)
  ── Failure ('test-ggsurvfit_build.R:7:3'): ggsurvfit_build() works ─────────────
  `built_p <- ggsurvfit_build(p, combine_plots = FALSE)` threw an unexpected error.
  Message: argument "risktable_height" is missing, with no default
  Class:   getvarError/missingArgError/error/condition
  Backtrace:
      ▆
   1. ├─testthat::expect_error(...) at test-ggsurvfit_build.R:7:3
   2. │ └─testthat:::expect_condition_matching(...)
   3. │   └─testthat:::quasi_capture(...)
   4. │     ├─testthat (local) .capture(...)
   5. │     │ └─base::withCallingHandlers(...)
   6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   7. └─ggsurvfit::ggsurvfit_build(p, combine_plots = FALSE)
   8.   ├─rlang::inject(...)
   9.   └─ggsurvfit:::.construct_risktable(...)
  ── Error ('test-ggsurvfit_build.R:12:3'): ggsurvfit_build() works ──────────────
  Error in `eval(code, test_env)`: object 'built_p' not found
  Backtrace:
      ▆
   1. ├─testthat::expect_true(inherits(built_p, "list")) at test-ggsurvfit_build.R:12:3
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─base::inherits(built_p, "list")
  ── Failure ('test-grid.draw_ggsurvfit.R:8:3'): grid.draw() works ───────────────
  `save_image_png(...)` threw an unexpected error.
  Message: argument "risktable_height" is missing, with no default
  Class:   getvarError/missingArgError/error/condition
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test-grid.draw_ggsurvfit.R:8:3
    2. │ └─testthat:::expect_condition_matching(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─ggsurvfit (local) save_image_png(...)
    8. │ └─ggplot2::ggsave(filename = path, plot = x) at test-grid.draw_ggsurvfit.R:4:5
    9. │   └─base::lapply(plot, grid.draw)
   10. │     ├─grid (local) FUN(X[[i]], ...)
   11. │     └─ggsurvfit:::grid.draw.ggsurvfit(X[[i]], ...)
   12. │       ├─ggsurvfit_build(x, combine_plots = TRUE) %>% ...
   13. │       └─ggsurvfit::ggsurvfit_build(x, combine_plots = TRUE)
   14. │         ├─rlang::inject(...)
   15. │         └─ggsurvfit:::.construct_risktable(...)
   16. └─grid::grid.draw(., recording = recording)
  ── Failure ('test-grid.draw_ggsurvfit.R:17:3'): grid.draw() works ──────────────
  `save_image_png(...)` threw an unexpected error.
  Message: argument "risktable_height" is missing, with no default
  Class:   getvarError/missingArgError/error/condition
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test-grid.draw_ggsurvfit.R:17:3
    2. │ └─testthat:::expect_condition_matching(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─ggsurvfit (local) save_image_png(...)
    8. │ └─ggplot2::ggsave(filename = path, plot = x) at test-grid.draw_ggsurvfit.R:4:5
    9. │   └─base::lapply(plot, grid.draw)
   10. │     ├─grid (local) FUN(X[[i]], ...)
   11. │     └─ggsurvfit:::grid.draw.ggcuminc(X[[i]], ...)
   12. │       ├─ggsurvfit_build(x, combine_plots = TRUE) %>% ...
   13. │       └─ggsurvfit::ggsurvfit_build(x, combine_plots = TRUE)
   14. │         ├─rlang::inject(...)
   15. │         └─ggsurvfit:::.construct_risktable(...)
   16. └─grid::grid.draw(., recording = recording)
  ── Failure ('test-theme_risktable.R:12:3'): theme_risktable works ──────────────
  `lst_survfit2_default %>% lapply(function(x) print(x))` threw an unexpected error.
  Message: argument "risktable_height" is missing, with no default
  Class:   getvarError/missingArgError/error/condition
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test-theme_risktable.R:12:3
    2. │ └─testthat:::expect_condition_matching(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─lst_survfit2_default %>% lapply(function(x) print(x))
    8. └─base::lapply(., function(x) print(x))
    9.   └─ggsurvfit (local) FUN(X[[i]], ...)
   10.     ├─base::print(x) at test-theme_risktable.R:12:48
   11.     └─ggsurvfit:::print.ggsurvfit(x)
   12.       └─ggsurvfit::ggsurvfit_build(x, combine_plots = TRUE)
   13.         ├─rlang::inject(...)
   14.         └─ggsurvfit:::.construct_risktable(...)
  ── Failure ('test-theme_risktable.R:21:3'): theme_risktable works ──────────────
  `lst_survfit2_boxed %>% lapply(function(x) print(x))` threw an unexpected error.
  Message: argument "risktable_height" is missing, with no default
  Class:   getvarError/missingArgError/error/condition
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test-theme_risktable.R:21:3
    2. │ └─testthat:::expect_condition_matching(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─lst_survfit2_boxed %>% lapply(function(x) print(x))
    8. └─base::lapply(., function(x) print(x))
    9.   └─ggsurvfit (local) FUN(X[[i]], ...)
   10.     ├─base::print(x) at test-theme_risktable.R:21:46
   11.     └─ggsurvfit:::print.ggsurvfit(x)
   12.       └─ggsurvfit::ggsurvfit_build(x, combine_plots = TRUE)
   13.         ├─rlang::inject(...)
   14.         └─ggsurvfit:::.construct_risktable(...)
  ── Failure ('test-theme_risktable.R:29:3'): theme_risktable works ──────────────
  `lst_survfit2_boxed_symbol %>% lapply(function(x) ggsurvfit_build(x))` threw an unexpected error.
  Message: argument "risktable_height" is missing, with no default
  Class:   getvarError/missingArgError/error/condition
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test-theme_risktable.R:29:3
    2. │ └─testthat:::expect_condition_matching(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─lst_survfit2_boxed_symbol %>% ...
    8. └─base::lapply(., function(x) ggsurvfit_build(x))
    9.   └─ggsurvfit (local) FUN(X[[i]], ...)
   10.     └─ggsurvfit::ggsurvfit_build(x) at test-theme_risktable.R:29:53
   11.       ├─rlang::inject(...)
   12.       └─ggsurvfit:::.construct_risktable(...)
  ── Error ('test-theme_risktable.R:33:3'): theme_risktable works ────────────────
  <getvarError/missingArgError/error/condition>
  Error in `.construct_risktable(x, geom_blank.times = NULL, geom_blank.risktable_stats = c("{n.risk}", 
  "{cum.event}"), geom_blank.stats_label = NULL, geom_blank.combine_groups = FALSE, 
      geom_blank.risktable_group = "auto", geom_blank.risktable_height = NULL, 
      geom_blank.theme = list(structure(list(line = <object>, rect = <object>, 
          text = <object>, title = <object>, point = <object>, 
          polygon = <object>, geom = <object>, spacing = structure(5.5, unit = 8L, class = c("simpleUnit", 
          "unit", "unit_v2")), margins = structure(c(5.5, 5.5, 
          5.5, 5.5), class = c("ggplot2::margin", "simpleUnit", 
          "unit", "unit_v2", "S7_object"), S7_class = structure(function (t = 0, 
              r = 0, b = 0, l = 0, unit = "pt", ...) 
          {
              warn_dots_empty()
              lens <- c(length(t), length(r), length(b), length(l))
              if (any(lens != 1)) {
                  incorrect <- c("t", "r", "b", "l")[lens != 1]
                  s <- if (length(incorrect) > 1) 
                    "s"
                  else ""
                  cli::cli_warn(c("In {.fn margin}, the argument{s} {.and {.arg {incorrect}}} should \\\n        have length 1, not length {.and {lens[lens != 1]}}.", 
                    i = "Argument{s} get(s) truncated to length 1."))
                  t <- t[1]
                  r <- r[1]
                  b <- b[1]
                  l <- l[1]
              }
              u <- unit(c(t, r, b, l), unit)
              S7::new_object(u)
          }, name = "margin", parent = structure(list(class = c("simpleUnit", 
          "unit", "unit_v2"), constructor = function (.data) 
          {
              stop(sprintf("S3 class <%s> doesn't have a constructor", 
                  class[[1]]), call. = FALSE)
          }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(), abstract = FALSE, constructor = function (t = 0, 
              r = 0, b = 0, l = 0, unit = "pt", ...) 
          {
              warn_dots_empty()
              lens <- c(length(t), length(r), length(b), length(l))
              if (any(lens != 1)) {
                  incorrect <- c("t", "r", "b", "l")[lens != 1]
                  s <- if (length(incorrect) > 1) 
                    "s"
                  else ""
                  cli::cli_warn(c("In {.fn margin}, the argument{s} {.and {.arg {incorrect}}} should \\\n        have length 1, not length {.and {lens[lens != 1]}}.", 
                    i = "Argument{s} get(s) truncated to length 1."))
                  t <- t[1]
                  r <- r[1]
                  b <- b[1]
                  l <- l[1]
              }
              u <- unit(c(t, r, b, l), unit)
              S7::new_object(u)
          }, class = c("S7_class", "S7_object")), unit = 8L), aspect.ratio = NULL, 
          axis.title = NULL, axis.title.x = <object>, axis.title.x.top = <object>, 
          axis.title.x.bottom = NULL, axis.title.y = <object>, 
          axis.title.y.left = NULL, axis.title.y.right = <object>, 
          axis.text = <object>, axis.text.x = <object>, axis.text.x.top = <object>, 
          axis.text.x.bottom = NULL, axis.text.y = <object>, axis.text.y.left = NULL, 
          axis.text.y.right = <object>, axis.text.theta = NULL, 
          axis.text.r = <object>, axis.ticks = <object>, axis.ticks.x = NULL, 
          axis.ticks.x.top = NULL, axis.ticks.x.bottom = NULL, 
          axis.ticks.y = NULL, axis.ticks.y.left = NULL, axis.ticks.y.right = NULL, 
          axis.ticks.theta = NULL, axis.ticks.r = NULL, axis.minor.ticks.x.top = NULL, 
          axis.minor.ticks.x.bottom = NULL, axis.minor.ticks.y.left = NULL, 
          axis.minor.ticks.y.right = NULL, axis.minor.ticks.theta = NULL, 
          axis.minor.ticks.r = NULL, axis.ticks.length = structure(0.5, class = "rel"), 
          axis.ticks.length.x = NULL, axis.ticks.length.x.top = NULL, 
          axis.ticks.length.x.bottom = NULL, axis.ticks.length.y = NULL, 
          axis.ticks.length.y.left = NULL, axis.ticks.length.y.right = NULL, 
          axis.ticks.length.theta = NULL, axis.ticks.length.r = NULL, 
          axis.minor.ticks.length = structure(0.75, class = "rel"), 
          axis.minor.ticks.length.x = NULL, axis.minor.ticks.length.x.top = NULL, 
          axis.minor.ticks.length.x.bottom = NULL, axis.minor.ticks.length.y = NULL, 
          axis.minor.ticks.length.y.left = NULL, axis.minor.ticks.length.y.right = NULL, 
          axis.minor.ticks.length.theta = NULL, axis.minor.ticks.length.r = NULL, 
          axis.line = <object>, axis.line.x = NULL, axis.line.x.top = NULL, 
          axis.line.x.bottom = NULL, axis.line.y = NULL, axis.line.y.left = NULL, 
          axis.line.y.right = NULL, axis.line.theta = NULL, axis.line.r = NULL, 
          legend.background = <object>, legend.margin = NULL, legend.spacing = structure(2, class = "rel"), 
          legend.spacing.x = NULL, legend.spacing.y = NULL, legend.key = NULL, 
          legend.key.size = structure(1.2, unit = 3L, class = c("simpleUnit", 
          "unit", "unit_v2")), legend.key.height = NULL, legend.key.width = NULL, 
          legend.key.spacing = NULL, legend.key.spacing.x = NULL, 
          legend.key.spacing.y = NULL, legend.key.justification = NULL, 
          legend.frame = NULL, legend.ticks = NULL, legend.ticks.length = structure(0.2, class = "rel"), 
          legend.axis.line = NULL, legend.text = <object>, legend.text.position = NULL, 
          legend.title = <object>, legend.title.position = NULL, 
          legend.position = "right", legend.position.inside = NULL, 
          legend.direction = NULL, legend.byrow = NULL, legend.justification = "center", 
          legend.justification.top = NULL, legend.justification.bottom = NULL, 
          legend.justification.left = NULL, legend.justification.right = NULL, 
          legend.justification.inside = NULL, legend.location = NULL, 
          legend.box = NULL, legend.box.just = NULL, legend.box.margin = structure(c(0, 
          0, 0, 0), class = c("ggplot2::margin", "simpleUnit", 
          "unit", "unit_v2", "S7_object"), S7_class = structure(function (t = 0, 
              r = 0, b = 0, l = 0, unit = "pt", ...) 
          {
              warn_dots_empty()
              lens <- c(length(t), length(r), length(b), length(l))
              if (any(lens != 1)) {
                  incorrect <- c("t", "r", "b", "l")[lens != 1]
                  s <- if (length(incorrect) > 1) 
                    "s"
                  else ""
                  cli::cli_warn(c("In {.fn margin}, the argument{s} {.and {.arg {incorrect}}} should \\\n        have length 1, not length {.and {lens[lens != 1]}}.", 
                    i = "Argument{s} get(s) truncated to length 1."))
                  t <- t[1]
                  r <- r[1]
                  b <- b[1]
                  l <- l[1]
              }
              u <- unit(c(t, r, b, l), unit)
              S7::new_object(u)
          }, name = "margin", parent = structure(list(class = c("simpleUnit", 
          "unit", "unit_v2"), constructor = function (.data) 
          {
              stop(sprintf("S3 class <%s> doesn't have a constructor", 
                  class[[1]]), call. = FALSE)
          }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(), abstract = FALSE, constructor = function (t = 0, 
              r = 0, b = 0, l = 0, unit = "pt", ...) 
          {
              warn_dots_empty()
              lens <- c(length(t), length(r), length(b), length(l))
              if (any(lens != 1)) {
                  incorrect <- c("t", "r", "b", "l")[lens != 1]
                  s <- if (length(incorrect) > 1) 
                    "s"
                  else ""
                  cli::cli_warn(c("In {.fn margin}, the argument{s} {.and {.arg {incorrect}}} should \\\n        have length 1, not length {.and {lens[lens != 1]}}.", 
                    i = "Argument{s} get(s) truncated to length 1."))
                  t <- t[1]
                  r <- r[1]
                  b <- b[1]
                  l <- l[1]
              }
              u <- unit(c(t, r, b, l), unit)
              S7::new_object(u)
          }, class = c("S7_class", "S7_object")), unit = 8L), legend.box.background = <object>, 
          legend.box.spacing = structure(2, class = "rel"), panel.background = <object>, 
          panel.border = <object>, panel.spacing = NULL, panel.spacing.x = NULL, 
          panel.spacing.y = NULL, panel.grid = <object>, panel.grid.major = NULL, 
          panel.grid.minor = <object>, panel.grid.major.x = NULL, 
          panel.grid.major.y = NULL, panel.grid.minor.x = NULL, 
          panel.grid.minor.y = NULL, panel.ontop = FALSE, panel.widths = NULL, 
          panel.heights = NULL, plot.background = <object>, plot.title = <object>, 
          plot.title.position = "panel", plot.subtitle = <object>, 
          plot.caption = <object>, plot.caption.position = "panel", 
          plot.tag = <object>, plot.tag.position = "topleft", plot.tag.location = NULL, 
          plot.margin = NULL, strip.background = <object>, strip.background.x = NULL, 
          strip.background.y = NULL, strip.clip = "on", strip.placement = "inside", 
          strip.text = <object>, strip.text.x = NULL, strip.text.x.bottom = NULL, 
          strip.text.x.top = NULL, strip.text.y = <object>, strip.text.y.left = <object>, 
          strip.text.y.right = NULL, strip.switch.pad.grid = structure(2.75, unit = 8L, class = c("simpleUnit", 
          "unit", "unit_v2")), strip.switch.pad.wrap = structure(2.75, unit = 8L, class = c("simpleUnit", 
          "unit", "unit_v2"))), class = c("theme", "ggplot2::theme", 
      "gg", "S7_object"), S7_class = structure(function (elements = list(), 
          ..., complete = FALSE, validate = TRUE) 
      {
          warn_dots_empty()
          S7::new_object(elements, complete = complete, validate = validate)
      }, name = "theme", parent = structure(list(class = "gg", 
          constructor = function (.data) 
          {
              stop(sprintf("S3 class <%s> doesn't have a constructor", 
                  class[[1]]), call. = FALSE)
          }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(
          complete = structure(list(name = "complete", class = structure(list(
              class = "logical", constructor_name = "logical", 
              constructor = function (.data = logical(0)) 
              .data, validator = function (object) 
              {
                  if (base_class(object) != name) {
                    sprintf("Underlying data must be <%s> not <%s>", 
                      name, base_class(object))
                  }
              }), class = "S7_base_class"), getter = NULL, setter = NULL, 
              validator = NULL, default = NULL), class = "S7_property"), 
          validate = structure(list(name = "validate", class = structure(list(
              class = "logical", constructor_name = "logical", 
              constructor = function (.data = logical(0)) 
              .data, validator = function (object) 
              {
                  if (base_class(object) != name) {
                    sprintf("Underlying data must be <%s> not <%s>", 
                      name, base_class(object))
                  }
              }), class = "S7_base_class"), getter = NULL, setter = NULL, 
              validator = NULL, default = NULL), class = "S7_property")), abstract = FALSE, constructor = function (elements = list(), 
          ..., complete = FALSE, validate = TRUE) 
      {
          warn_dots_empty()
          S7::new_object(elements, complete = complete, validate = validate)
      }, class = c("S7_class", "S7_object")), complete = TRUE, validate = TRUE), 
          structure(list(axis.title.x = <object>, axis.text.x = <object>, 
              axis.text.y = <object>, axis.ticks = <object>, axis.line = <object>, 
              legend.position = "none", panel.border = <object>, 
              panel.grid.major = <object>, panel.grid.minor = <object>, 
              plot.title = <object>, plot.margin = structure(c(0, 
              5.5, 0, 5.5), unit = 8L, class = c("simpleUnit", 
              "unit", "unit_v2"))), class = c("theme", "ggplot2::theme", 
          "gg", "S7_object"), S7_class = structure(function (elements = list(), 
              ..., complete = FALSE, validate = TRUE) 
          {
              warn_dots_empty()
              S7::new_object(elements, complete = complete, validate = validate)
          }, name = "theme", parent = structure(list(class = "gg", 
              constructor = function (.data) 
              {
                  stop(sprintf("S3 class <%s> doesn't have a constructor", 
                    class[[1]]), call. = FALSE)
              }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(
              complete = structure(list(name = "complete", class = structure(list(
                  class = "logical", constructor_name = "logical", 
                  constructor = function (.data = logical(0)) 
                  .data, validator = function (object) 
                  {
                    if (base_class(object) != name) {
                      sprintf("Underlying data must be <%s> not <%s>", 
                        name, base_class(object))
                    }
                  }), class = "S7_base_class"), getter = NULL, 
                  setter = NULL, validator = NULL, default = NULL), class = "S7_property"), 
              validate = structure(list(name = "validate", class = structure(list(
                  class = "logical", constructor_name = "logical", 
                  constructor = function (.data = logical(0)) 
                  .data, validator = function (object) 
                  {
                    if (base_class(object) != name) {
                      sprintf("Underlying data must be <%s> not <%s>", 
                        name, base_class(object))
                    }
                  }), class = "S7_base_class"), getter = NULL, 
                  setter = NULL, validator = NULL, default = NULL), class = "S7_property")), abstract = FALSE, constructor = function (elements = list(), 
              ..., complete = FALSE, validate = TRUE) 
          {
              warn_dots_empty()
              S7::new_object(elements, complete = complete, validate = validate)
          }, class = c("S7_class", "S7_object")), complete = FALSE, validate = TRUE), 
          structure(list(x = NULL), class = c("ggplot2::labels", 
          "gg", "S7_object"), S7_class = structure(function (labels = list(), 
              ...) 
          {
              warn_dots_empty()
              S7::new_object(labels)
          }, name = "labels", parent = structure(list(class = "gg", 
              constructor = function (.data) 
              {
                  stop(sprintf("S3 class <%s> doesn't have a constructor", 
                    class[[1]]), call. = FALSE)
              }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(), abstract = FALSE, constructor = function (labels = list(), 
              ...) 
          {
              warn_dots_empty()
              S7::new_object(labels)
          }, validator = function (self) 
          {
              if (!is.list(self)) {
                  return("labels must be a list.")
              }
              if (!is_named2(self)) {
                  return("every label must be named.")
              }
              dups <- unique(names(self)[duplicated(names(self))])
              if (length(dups) > 0) {
                  dups <- oxford_comma(dups, final = "and")
                  return(paste0("labels cannot contain duplicate names (", 
                    dups, ")."))
              }
              return(NULL)
          }, class = c("S7_class", "S7_object"))), structure(list(
              y = NULL), class = c("ggplot2::labels", "gg", "S7_object"
          ), S7_class = structure(function (labels = list(), ...) 
          {
              warn_dots_empty()
              S7::new_object(labels)
          }, name = "labels", parent = structure(list(class = "gg", 
              constructor = function (.data) 
              {
                  stop(sprintf("S3 class <%s> doesn't have a constructor", 
                    class[[1]]), call. = FALSE)
              }, validator = NULL), class = "S7_S3_class"), package = "ggplot2", properties = list(), abstract = FALSE, constructor = function (labels = list(), 
              ...) 
          {
              warn_dots_empty()
              S7::new_object(labels)
          }, validator = function (self) 
          {
              if (!is.list(self)) {
                  return("labels must be a list.")
              }
              if (!is_named2(self)) {
                  return("every label must be named.")
              }
              dups <- unique(names(self)[duplicated(names(self))])
              if (length(dups) > 0) {
                  dups <- oxford_comma(dups, final = "and")
                  return(paste0("labels cannot contain duplicate names (", 
                    dups, ")."))
              }
              return(NULL)
          }, class = c("S7_class", "S7_object")))), geom_blank.size = 3.5, 
      combine_plots = combine_plots, risktable_symbol_args = risktable_symbol_args)`: argument "risktable_height" is missing, with no default
  Backtrace:
      ▆
   1. └─vdiffr::expect_doppelganger(...) at test-theme_risktable.R:33:3
   2.   └─vdiffr (local) writer(fig, testcase, title)
   3.     ├─vdiffr:::print_plot(plot, title)
   4.     └─vdiffr:::print_plot.ggplot(plot, title)
   5.       ├─base::print(p)
   6.       └─ggsurvfit:::print.ggsurvfit(p)
   7.         └─ggsurvfit::ggsurvfit_build(x, combine_plots = TRUE)
   8.           ├─rlang::inject(...)
   9.           └─ggsurvfit:::.construct_risktable(...)
  
  [ FAIL 36 | WARN 0 | SKIP 17 | PASS 204 ]
  Deleting unused snapshots:
  • add_censor_mark/cuminc2-censor-mark-all-outcomes.svg
  • add_censor_mark/cuminc2-censor-mark.svg
  • add_censor_mark/cuminc3-censor-mark-all-outcomes.svg
  • add_censor_mark/cuminc3-censor-mark.svg
  • add_censor_mark/sf2-censor-mark.svg
  • add_censor_mark/sf3-censor-mark.svg
  • add_confidence_interval/cuminc2-confidence-interval-all-outcomes.svg
  • add_confidence_interval/cuminc2-confidence-interval.svg
  • add_confidence_interval/cuminc3-confidence-interval-all-outcomes.svg
  • add_confidence_interval/cuminc3-confidence-interval.svg
  • add_confidence_interval/sf2-confidence-interval.svg
  • add_confidence_interval/sf3-confidence-interval.svg
  • add_pvalue/cuminc2-pvalue.svg
  • add_pvalue/sf2-pvalue-annotation-risk.svg
  • add_pvalue/sf2-pvalue-annotation.svg
  • add_pvalue/sf2-pvalue-with-survfit.svg
  • add_quantile/cuminc2-quantile-all-outcomes.svg
  • add_quantile/cuminc2-quantile.svg
  • add_quantile/cuminc3-quantile-all-outcomes.svg
  • add_quantile/cuminc3-quantile.svg
  • add_quantile/sf-mtcars-decreasing-many-quantiles.svg
  • add_quantile/sf-mtcars-decreasing.svg
  • add_quantile/sf-mtcars-increasing-many-quantiles.svg
  • add_quantile/sf-mtcars-increasing.svg
  • add_quantile/sf-mtcars-timing.svg
  • add_quantile/sf2-colon-quantile-no-line.svg
  • add_quantile/sf2-colon-quantile.svg
  • add_quantile/sf2-quantile-x-value-not-all-groups.svg
  • add_quantile/sf2-quantile-x-value-out-of-bounds.svg
  • add_quantile/sf2-quantile.svg
  • add_quantile/sf3-quantile.svg
  • add_risktable/add-risktable-overall1.svg
  • add_risktable/add-risktable-overall2.svg
  • add_risktable/add-risktable-weights.svg
  • add_risktable/cuminc2-risktable-all-outcomes.svg
  • add_risktable/cuminc2-risktable.svg
  • add_risktable/cuminc3-risktable-all-outcomes.svg
  • add_risktable/cuminc3-risktable.svg
  • add_risktable/sf-start-time.svg
  • add_risktable/sf1-risktable-custom-stats-and-label2.svg
  • add_risktable/sf1-risktable-height.svg
  • add_risktable/sf2-risktable-custom-stats-and-label.svg
  • add_risktable/sf2-risktable-custom-stats-and-label2.svg
  • add_risktable/sf2-risktable.svg
  • add_risktable/sf3-risktable-custom-stats-and-label.svg
  • add_risktable/sf3-risktable-custom-stats-and-label2.svg
  • add_risktable/sf3-risktable.svg
  • add_risktable_strata_symbol/add-risktable-strata-symbol-circle.svg
  • add_risktable_strata_symbol/add-risktable-strata-symbol-uni.svg
  • ggcuminc/cuminc1-ggcuminc-sf-all-outcomes.svg
  • ggcuminc/cuminc1-ggcuminc.svg
  • ggcuminc/cuminc2-ggcuminc-all-outcomes.svg
  • ggcuminc/cuminc2-ggcuminc-sf-all-outcomes.svg
  • ggcuminc/cuminc2-ggcuminc.svg
  • ggcuminc/cuminc3-ggcuminc-all-outcomes.svg
  • ggcuminc/cuminc3-ggcuminc-sf-all-outcomes.svg
  • ggcuminc/cuminc3-ggcuminc.svg
  • ggcuminc/sf-cuminc2-ggcuminc.svg
  • ggcuminc/sf-cuminc3-ggcuminc.svg
  • ggsurvfit/sf1-ggsurvfit-cloglog.svg
  • ggsurvfit/sf1-ggsurvfit-cumhaz.svg
  • ggsurvfit/sf1-ggsurvfit-custom.svg
  • ggsurvfit/sf1-ggsurvfit-kmunicate.svg
  • ggsurvfit/sf1-ggsurvfit-risk.svg
  • ggsurvfit/sf2-ggsurvfit-cloglog.svg
  • ggsurvfit/sf2-ggsurvfit-cumhaz.svg
  • ggsurvfit/sf2-ggsurvfit-custom.svg
  • ggsurvfit/sf2-ggsurvfit-kmunicate.svg
  • ggsurvfit/sf2-ggsurvfit-linetype.svg
  • ggsurvfit/sf2-ggsurvfit-new-data-geom2.svg
  • ggsurvfit/sf2-ggsurvfit-risk.svg
  • ggsurvfit/sf2-ggsurvfit-strata-transformation.svg
  • ggsurvfit/sf2-ggsurvfit.svg
  • ggsurvfit/sf3-ggsurvfit-cloglog.svg
  • ggsurvfit/sf3-ggsurvfit-cumhaz.svg
  • ggsurvfit/sf3-ggsurvfit-custom.svg
  • ggsurvfit/sf3-ggsurvfit-kmunicate.svg
  • ggsurvfit/sf3-ggsurvfit-linetype.svg
  • ggsurvfit/sf3-ggsurvfit-risk.svg
  • ggsurvfit/sf3-ggsurvfit.svg
  • ggsurvfit_options/ggci-outcomes-linetype.svg
  • ggsurvfit_options/ggci-outcomes.svg
  • ggsurvfit_options/ggci-strata.svg
  • stat_stepribbon/gg-stepribbon2.svg
  • theme_risktable/sf1-ggsurvfit-theme-risktable-boxed-symbol.svg
  • theme_risktable/sf1-ggsurvfit-theme-risktable-boxed.svg
  • theme_risktable/sf2-ggsurvfit-theme-risktable-boxed-symbol.svg
  • theme_risktable/sf2-ggsurvfit-theme-risktable-boxed.svg
  • theme_risktable/sf2-ggsurvfit-theme-risktable-default.svg
  • theme_risktable/sf3-ggsurvfit-theme-risktable-boxed-symbol.svg
  • theme_risktable/sf3-ggsurvfit-theme-risktable-boxed.svg
  • theme_risktable/sf3-ggsurvfit-theme-risktable-default.svg
  Error: Test failures
  Execution halted