Running ‘testthat.R’ [14s/17s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > pkg_name <- "tern"
  > library(testthat)
  > test_check(pkg_name, reporter = ParallelProgressReporter$new())
  Loading required package: tern
  Loading required package: rtables
  Loading required package: formatters
  
  Attaching package: 'formatters'
  
  The following object is masked from 'package:base':
  
      %||%
  
  Loading required package: magrittr
  
  Attaching package: 'magrittr'
  
  The following objects are masked from 'package:testthat':
  
      equals, is_less_than, not
  
  
  Attaching package: 'rtables'
  
  The following object is masked from 'package:utils':
  
      str
  
  Registered S3 method overwritten by 'tern':
    method   from 
    tidy.glm broom
  
  Attaching package: 'dplyr'
  
  The following objects are masked from 'package:stats':
  
      filter, lag
  
  The following objects are masked from 'package:base':
  
      intersect, setdiff, setequal, union
  
  ✔ | F W  S  OK | Context
  
  ⠋ [ FAIL 0 | WARN 0 | SKIP 0 | PASS 0 ] Starting up...                          
  ✖ | 3    4   4 | abnormal                                                       
  ────────────────────────────────────────────────────────────────────────────────
  Error ('test-abnormal.R:98:3'): count_abnormal works with default arguments
  Error in `match.arg(round_type)`: 'arg' must be of length 1
  Backtrace:
       ▆
    1. ├─... %>% build_table(df) at test-abnormal.R:98:3
    2. └─rtables::build_table(., df)
    3.   └─rtables::update_ref_indexing(tab)
    4.     ├─formatters::make_row_df(tt)
    5.     └─rtables::make_row_df(tt)
    6.       └─rtables (local) .local(...)
    7.         ├─formatters::make_row_df(...)
    8.         └─rtables::make_row_df(...)
    9.           └─rtables (local) .local(...)
   10.             ├─formatters::pagdfrow(...)
   11.             │ └─base::data.frame(...)
   12.             ├─formatters::nlines(...)
   13.             └─rtables::nlines(...)
   14.               ├─base::as.vector(get_formatted_cells(x))
   15.               ├─rtables::get_formatted_cells(x)
   16.               └─rtables::get_formatted_cells(x)
   17.                 ├─base::matrix(...)
   18.                 ├─base::unlist(...)
   19.                 └─base::Map(...)
   20.                   └─base::mapply(FUN = f, ..., SIMPLIFY = FALSE)
   21.                     └─rtables (local) `<fn>`(val = dots[[1L]][[1L]], spn = dots[[2L]][[1L]], shelli = dots[[3L]][[1L]])
   22.                       └─rtables::format_rcell(...)
   23.                         └─formatters::format_value(...)
   24.                           └─base::match.arg(round_type)
  
  Error ('test-abnormal.R:122:3'): count_abnormal works with custom arguments
  Error in `match.arg(round_type)`: 'arg' must be of length 1
  Backtrace:
       ▆
    1. ├─... %>% build_table(df2) at test-abnormal.R:122:3
    2. └─rtables::build_table(., df2)
    3.   └─rtables::update_ref_indexing(tab)
    4.     ├─formatters::make_row_df(tt)
    5.     └─rtables::make_row_df(tt)
    6.       └─rtables (local) .local(...)
    7.         ├─formatters::make_row_df(...)
    8.         └─rtables::make_row_df(...)
    9.           └─rtables (local) .local(...)
   10.             ├─formatters::pagdfrow(...)
   11.             │ └─base::data.frame(...)
   12.             ├─formatters::nlines(...)
   13.             └─rtables::nlines(...)
   14.               ├─base::as.vector(get_formatted_cells(x))
   15.               ├─rtables::get_formatted_cells(x)
   16.               └─rtables::get_formatted_cells(x)
   17.                 ├─base::matrix(...)
   18.                 ├─base::unlist(...)
   19.                 └─base::Map(...)
   20.                   └─base::mapply(FUN = f, ..., SIMPLIFY = FALSE)
   21.                     └─rtables (local) `<fn>`(val = dots[[1L]][[1L]], spn = dots[[2L]][[1L]], shelli = dots[[3L]][[1L]])
   22.                       └─rtables::format_rcell(...)
   23.                         └─formatters::format_value(...)
   24.                           └─base::match.arg(round_type)
  
  Error ('test-abnormal.R:154:3'): count_abnormal works with default arguments and visit
  Error in `match.arg(round_type)`: 'arg' must be of length 1
  Backtrace:
       ▆
    1. ├─... %>% build_table(df) at test-abnormal.R:154:3
    2. └─rtables::build_table(., df)
    3.   └─rtables::update_ref_indexing(tab)
    4.     ├─formatters::make_row_df(tt)
    5.     └─rtables::make_row_df(tt)
    6.       └─rtables (local) .local(...)
    7.         ├─formatters::make_row_df(...)
    8.         └─rtables::make_row_df(...)
    9.           └─rtables (local) .local(...)
   10.             ├─formatters::make_row_df(...)
   11.             └─rtables::make_row_df(...)
   12.               └─rtables (local) .local(...)
   13.                 ├─formatters::make_row_df(...)
   14.                 └─rtables::make_row_df(...)
   15.                   └─rtables (local) .local(...)
   16.                     ├─formatters::pagdfrow(...)
   17.                     │ └─base::data.frame(...)
   18.                     ├─formatters::nlines(...)
   19.                     └─rtables::nlines(...)
   20.                       ├─base::as.vector(get_formatted_cells(x))
   21.                       ├─rtables::get_formatted_cells(x)
   22.                       └─rtables::get_formatted_cells(x)
   23.                         ├─base::matrix(...)
   24.                         ├─base::unlist(...)
   25.                         └─base::Map(...)
   26.                           └─base::mapply(FUN = f, ..., SIMPLIFY = FALSE)
   27.                             └─rtables (local) `<fn>`(val = dots[[1L]][[1L]], spn = dots[[2L]][[1L]], shelli = dots[[3L]][[1L]])
   28.                               └─rtables::format_rcell(...)
   29.                                 └─formatters::format_value(...)
   30.                                   └─base::match.arg(round_type)
  ────────────────────────────────────────────────────────────────────────────────
  
  ✖ | 2    3   8 | abnormal_by_baseline                                           
  ────────────────────────────────────────────────────────────────────────────────
  Error ('test-abnormal_by_baseline.R:89:3'): count_abnormal_by_baseline works with default arguments
  Error in `match.arg(round_type)`: 'arg' must be of length 1
  Backtrace:
       ▆
    1. ├─... %>% build_table(df) at test-abnormal_by_baseline.R:89:3
    2. └─rtables::build_table(., df)
    3.   └─rtables::update_ref_indexing(tab)
    4.     ├─formatters::make_row_df(tt)
    5.     └─rtables::make_row_df(tt)
    6.       └─rtables (local) .local(...)
    7.         ├─formatters::make_row_df(...)
    8.         └─rtables::make_row_df(...)
    9.           └─rtables (local) .local(...)
   10.             ├─formatters::make_row_df(...)
   11.             └─rtables::make_row_df(...)
   12.               └─rtables (local) .local(...)
   13.                 ├─formatters::pagdfrow(...)
   14.                 │ └─base::data.frame(...)
   15.                 ├─formatters::nlines(...)
   16.                 └─rtables::nlines(...)
   17.                   ├─base::as.vector(get_formatted_cells(x))
   18.                   ├─rtables::get_formatted_cells(x)
   19.                   └─rtables::get_formatted_cells(x)
   20.                     ├─base::matrix(...)
   21.                     ├─base::unlist(...)
   22.                     └─base::Map(...)
   23.                       └─base::mapply(FUN = f, ..., SIMPLIFY = FALSE)
   24.                         └─rtables (local) `<fn>`(val = dots[[1L]][[1L]], spn = dots[[2L]][[1L]], shelli = dots[[3L]][[1L]])
   25.                           └─rtables::format_rcell(...)
   26.                             └─formatters::format_value(...)
   27.                               └─base::match.arg(round_type)
  
  Error ('test-abnormal_by_baseline.R:103:3'): count_abnormal_by_baseline works with custom arguments
  Error in `match.arg(round_type)`: 'arg' must be of length 1
  Backtrace:
       ▆
    1. ├─... %>% build_table(df2) at test-abnormal_by_baseline.R:103:3
    2. └─rtables::build_table(., df2)
    3.   └─rtables::update_ref_indexing(tab)
    4.     ├─formatters::make_row_df(tt)
    5.     └─rtables::make_row_df(tt)
    6.       └─rtables (local) .local(...)
    7.         ├─formatters::make_row_df(...)
    8.         └─rtables::make_row_df(...)
    9.           └─rtables (local) .local(...)
   10.             ├─formatters::make_row_df(...)
   11.             └─rtables::make_row_df(...)
   12.               └─rtables (local) .local(...)
   13.                 ├─formatters::pagdfrow(...)
   14.                 │ └─base::data.frame(...)
   15.                 ├─formatters::nlines(...)
   16.                 └─rtables::nlines(...)
   17.                   ├─base::as.vector(get_formatted_cells(x))
   18.                   ├─rtables::get_formatted_cells(x)
   19.                   └─rtables::get_formatted_cells(x)
   20.                     ├─base::matrix(...)
   21.                     ├─base::unlist(...)
   22.                     └─base::Map(...)
   23.                       └─base::mapply(FUN = f, ..., SIMPLIFY = FALSE)
   24.                         └─rtables (local) `<fn>`(val = dots[[1L]][[1L]], spn = dots[[2L]][[1L]], shelli = dots[[3L]][[1L]])
   25.                           └─rtables::format_rcell(...)
   26.                             └─formatters::format_value(...)
   27.                               └─base::match.arg(round_type)
  ────────────────────────────────────────────────────────────────────────────────
  
  ✖ | 1    2   3 | abnormal_by_marked [4.4s]                                      
  ────────────────────────────────────────────────────────────────────────────────
  Error ('test-abnormal_by_marked.R:242:3'): count_abnormal_by_marked works as expected
  Error in `match.arg(round_type)`: 'arg' must be of length 1
  Backtrace:
       ▆
    1. ├─... %>% build_table(df = adlb_f) at test-abnormal_by_marked.R:242:3
    2. └─rtables::build_table(., df = adlb_f)
    3.   └─rtables::update_ref_indexing(tab)
    4.     ├─formatters::make_row_df(tt)
    5.     └─rtables::make_row_df(tt)
    6.       └─rtables (local) .local(...)
    7.         ├─formatters::make_row_df(...)
    8.         └─rtables::make_row_df(...)
    9.           └─rtables (local) .local(...)
   10.             ├─formatters::make_row_df(...)
   11.             └─rtables::make_row_df(...)
   12.               └─rtables (local) .local(...)
   13.                 ├─formatters::make_row_df(...)
   14.                 └─rtables::make_row_df(...)
   15.                   └─rtables (local) .local(...)
   16.                     ├─formatters::pagdfrow(...)
   17.                     │ └─base::data.frame(...)
   18.                     ├─formatters::nlines(...)
   19.                     └─rtables::nlines(...)
   20.                       ├─base::as.vector(get_formatted_cells(x))
   21.                       ├─rtables::get_formatted_cells(x)
   22.                       └─rtables::get_formatted_cells(x)
   23.                         ├─base::matrix(...)
   24.                         ├─base::unlist(...)
   25.                         └─base::Map(...)
   26.                           └─base::mapply(FUN = f, ..., SIMPLIFY = FALSE)
   27.                             └─rtables (local) `<fn>`(val = dots[[1L]][[1L]], spn = dots[[2L]][[1L]], shelli = dots[[3L]][[1L]])
   28.                               └─rtables::format_rcell(...)
   29.                                 └─formatters::format_value(...)
   30.                                   └─base::match.arg(round_type)
  ────────────────────────────────────────────────────────────────────────────────
  
  ✖ | 1    1   2 | abnormal_by_worst_grade                                        
  ────────────────────────────────────────────────────────────────────────────────
  Error ('test-abnormal_by_worst_grade.R:60:3'): count_abnormal_by_worst_grade works as expected
  Error in `match.arg(round_type)`: 'arg' must be of length 1
  Backtrace:
       ▆
    1. ├─... %>% build_table(df = adlb_f) at test-abnormal_by_worst_grade.R:60:3
    2. └─rtables::build_table(., df = adlb_f)
    3.   └─rtables::update_ref_indexing(tab)
    4.     ├─formatters::make_row_df(tt)
    5.     └─rtables::make_row_df(tt)
    6.       └─rtables (local) .local(...)
    7.         ├─formatters::make_row_df(...)
    8.         └─rtables::make_row_df(...)
    9.           └─rtables (local) .local(...)
   10.             ├─formatters::make_row_df(...)
   11.             └─rtables::make_row_df(...)
   12.               └─rtables (local) .local(...)
   13.                 ├─formatters::make_row_df(...)
   14.                 └─rtables::make_row_df(...)
   15.                   └─rtables (local) .local(...)
   16.                     ├─formatters::make_row_df(...)
   17.                     └─rtables::make_row_df(...)
   18.                       └─rtables (local) .local(...)
   19.                         ├─formatters::make_row_df(...)
   20.                         └─rtables::make_row_df(...)
   21.                           └─rtables (local) .local(...)
   22.                             ├─formatters::pagdfrow(...)
   23.                             │ └─base::data.frame(...)
   24.                             ├─formatters::nlines(...)
   25.                             └─rtables::nlines(...)
   26.                               ├─base::as.vector(get_formatted_cells(x))
   27.                               ├─rtables::get_formatted_cells(x)
   28.                               └─rtables::get_formatted_cells(x)
   29.                                 ├─base::matrix(...)
   30.                                 ├─base::unlist(...)
   31.                                 └─base::Map(...)
   32.                                   └─base::mapply(FUN = f, ..., SIMPLIFY = FALSE)
   33.                                     └─rtables (local) `<fn>`(val = dots[[1L]][[1L]], spn = dots[[2L]][[1L]], shelli = dots[[3L]][[1L]])
   34.                                       └─rtables::format_rcell(...)
   35.                                         └─formatters::format_value(...)
   36.                                           └─base::match.arg(round_type)
  ────────────────────────────────────────────────────────────────────────────────
  
  ✖ | 1    7  11 | abnormal_lab_worsen_by_baseline                                
  ────────────────────────────────────────────────────────────────────────────────
  Error ('test-abnormal_lab_worsen_by_baseline.R:195:3'): count_abnormal_lab_worsen_by_baseline
  Error in `match.arg(round_type)`: 'arg' must be of length 1
  Backtrace:
       ▆
    1. ├─... %>% build_table(df = df, alt_counts_df = tern_ex_adsl) at test-abnormal_lab_worsen_by_baseline.R:195:3
    2. └─rtables::build_table(., df = df, alt_counts_df = tern_ex_adsl)
    3.   └─rtables::update_ref_indexing(tab)
    4.     ├─formatters::make_row_df(tt)
    5.     └─rtables::make_row_df(tt)
    6.       └─rtables (local) .local(...)
    7.         ├─formatters::make_row_df(...)
    8.         └─rtables::make_row_df(...)
    9.           └─rtables (local) .local(...)
   10.             ├─formatters::make_row_df(...)
   11.             └─rtables::make_row_df(...)
   12.               └─rtables (local) .local(...)
   13.                 ├─formatters::make_row_df(...)
   14.                 └─rtables::make_row_df(...)
   15.                   └─rtables (local) .local(...)
   16.                     ├─formatters::make_row_df(...)
   17.                     └─rtables::make_row_df(...)
   18.                       └─rtables (local) .local(...)
   19.                         ├─formatters::make_row_df(...)
   20.                         └─rtables::make_row_df(...)
   21.                           └─rtables (local) .local(...)
   22.                             ├─formatters::pagdfrow(...)
   23.                             │ └─base::data.frame(...)
   24.                             ├─formatters::nlines(...)
   25.                             └─rtables::nlines(...)
   26.                               ├─base::as.vector(get_formatted_cells(x))
   27.                               ├─rtables::get_formatted_cells(x)
   28.                               └─rtables::get_formatted_cells(x)
   29.                                 ├─base::matrix(...)
   30.                                 ├─base::unlist(...)
   31.                                 └─base::Map(...)
   32.                                   └─base::mapply(FUN = f, ..., SIMPLIFY = FALSE)
   33.                                     └─rtables (local) `<fn>`(val = dots[[1L]][[1L]], spn = dots[[2L]][[1L]], shelli = dots[[3L]][[1L]])
   34.                                       └─rtables::format_rcell(...)
   35.                                         └─formatters::format_value(...)
   36.                                           └─base::match.arg(round_type)
  ────────────────────────────────────────────────────────────────────────────────
  
  ⠙ [ FAIL 30 | WARN 0 | SKIP 32 | PASS 60 ] @ analyze_variables                  
  ────────────────────────────────────────────────────────────────────────────────
  Error ('test-analyze_variables.R:172:3'): a_summary work with healthy input.
  Error in `h(simpleError(msg, call))`: error in evaluating the argument 'x' in selecting a method for function 'print': 'arg' must be of length 1
  Backtrace:
       ▆
    1. ├─testthat::expect_snapshot(res) at test-analyze_variables.R:172:3
    2. │ └─testthat:::expect_snapshot_(...)
    3. │   ├─testthat:::with_is_snapshotting(...)
    4. │   └─testthat:::verify_exec(quo_get_expr(x), quo_get_env(x), replay)
    5. │     └─evaluate::evaluate(source, envir = env, new_device = FALSE, output_handler = handler)
    6. │       ├─base::withRestarts(...)
    7. │       │ └─base (local) withRestartList(expr, restarts)
    8. │       │   ├─base (local) withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])
    9. │       │   │ └─base (local) doWithOneRestart(return(expr), restart)
   10. │       │   └─base (local) withRestartList(expr, restarts[-nr])
   11. │       │     └─base (local) withOneRestart(expr, restarts[[1L]])
   12. │       │       └─base (local) doWithOneRestart(return(expr), restart)
   13. │       ├─evaluate:::with_handlers(...)
   14. │       │ ├─base::eval(call)
   15. │       │ │ └─base::eval(call)
   16. │       │ └─base::withCallingHandlers(...)
   17. │       └─watcher$print_value(ev$value, ev$visible, envir)
   18. │         ├─base::withVisible(handle_value(handler, value, visible, envir))
   19. │         └─evaluate:::handle_value(handler, value, visible, envir)
   20. │           ├─handler$value(value)
   21. │           └─testthat:::testthat_print.default(value)
   22. │             ├─base::print(x)
   23. │             └─rtables:::print.RowsVerticalSection(x)
   24. │               ├─base::print(...)
   25. │               ├─base::data.frame(...)
   26. │               └─base::vapply(x, format_rcell, character(1))
   27. │                 └─rtables (local) FUN(X[[i]], ...)
   28. │                   └─formatters::format_value(...)
   29. │                     └─base::match.arg(round_type)
   30. │                       └─base::stop(gettextf("'%s' must be of length 1", "arg"), domain = NA)
   31. └─base::.handleSimpleError(...)
   32.   └─base (local) h(simpleError(msg, call))
  
  Error ('test-analyze_variables.R:232:3'): a_summary works with custom input.
  Error in `h(simpleError(msg, call))`: error in evaluating the argument 'x' in selecting a method for function 'print': 'arg' must be of length 1
  Backtrace:
       ▆
    1. ├─testthat::expect_snapshot(res) at test-analyze_variables.R:232:3
    2. │ └─testthat:::expect_snapshot_(...)
    3. │   ├─testthat:::with_is_snapshotting(...)
    4. │   └─testthat:::verify_exec(quo_get_expr(x), quo_get_env(x), replay)
    5. │     └─evaluate::evaluate(source, envir = env, new_device = FALSE, output_handler = handler)
    6. │       ├─base::withRestarts(...)
    7. │       │ └─base (local) withRestartList(expr, restarts)
    8. │       │   ├─base (local) withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])
    9. │       │   │ └─base (local) doWithOneRestart(return(expr), restart)
   10. │       │   └─base (local) withRestartList(expr, restarts[-nr])
   11. │       │     └─base (local) withOneRestart(expr, restarts[[1L]])
   12. │       │       └─base (local) doWithOneRestart(return(expr), restart)
   13. │       ├─evaluate:::with_handlers(...)
   14. │       │ ├─base::eval(call)
   15. │       │ │ └─base::eval(call)
   16. │       │ └─base::withCallingHandlers(...)
   17. │       └─watcher$print_value(ev$value, ev$visible, envir)
   18. │         ├─base::withVisible(handle_value(handler, value, visible, envir))
   19. │         └─evaluate:::handle_value(handler, value, visible, envir)
   20. │           ├─handler$value(value)
   21. │           └─testthat:::testthat_print.default(value)
   22. │             ├─base::print(x)
   23. │             └─rtables:::print.RowsVerticalSection(x)
   24. │               ├─base::print(...)
   25. │               ├─base::data.frame(...)
   26. │               └─base::vapply(x, format_rcell, character(1))
   27. │                 └─rtables (local) FUN(X[[i]], ...)
   28. │                   └─formatters::format_value(...)
   29. │                     └─base::match.arg(round_type)
   30. │                       └─base::stop(gettextf("'%s' must be of length 1", "arg"), domain = NA)
   31. └─base::.handleSimpleError(...)
   32.   └─base (local) h(simpleError(msg, call))
  
  Error ('test-analyze_variables.R:253:3'): a_summary works with healthy input when compare_with_ref_group = TRUE.
  Error in `h(simpleError(msg, call))`: error in evaluating the argument 'x' in selecting a method for function 'print': 'arg' must be of length 1
  Backtrace:
       ▆
    1. ├─testthat::expect_snapshot(res) at test-analyze_variables.R:253:3
    2. │ └─testthat:::expect_snapshot_(...)
    3. │   ├─testthat:::with_is_snapshotting(...)
    4. │   └─testthat:::verify_exec(quo_get_expr(x), quo_get_env(x), replay)
    5. │     └─evaluate::evaluate(source, envir = env, new_device = FALSE, output_handler = handler)
    6. │       ├─base::withRestarts(...)
    7. │       │ └─base (local) withRestartList(expr, restarts)
    8. │       │   ├─base (local) withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])
    9. │       │   │ └─base (local) doWithOneRestart(return(expr), restart)
   10. │       │   └─base (local) withRestartList(expr, restarts[-nr])
   11. │       │     └─base (local) withOneRestart(expr, restarts[[1L]])
   12. │       │       └─base (local) doWithOneRestart(return(expr), restart)
   13. │       ├─evaluate:::with_handlers(...)
   14. │       │ ├─base::eval(call)
   15. │       │ │ └─base::eval(call)
   16. │       │ └─base::withCallingHandlers(...)
   17. │       └─watcher$print_value(ev$value, ev$visible, envir)
   18. │         ├─base::withVisible(handle_value(handler, value, visible, envir))
   19. │         └─evaluate:::handle_value(handler, value, visible, envir)
   20. │           ├─handler$value(value)
   21. │           └─testthat:::testthat_print.default(value)
   22. │             ├─base::print(x)
   23. │             └─rtables:::print.RowsVerticalSection(x)
   24. │               ├─base::print(...)
   25. │               ├─base::data.frame(...)
   26. │               └─base::vapply(x, format_rcell, character(1))
   27. │                 └─rtables (local) FUN(X[[i]], ...)
   28. │                   └─formatters::format_value(...)
   29. │                     └─base::match.arg(round_type)
   30. │                       └─base::stop(gettextf("'%s' must be of length 1", "arg"), domain = NA)
   31. └─base::.handleSimpleError(...)
   32.   └─base (local) h(simpleError(msg, call))
  
  Error ('test-analyze_variables.R:293:3'): a_summary works with custom input when compare_with_ref_group = TRUE.
  Error in `h(simpleError(msg, call))`: error in evaluating the argument 'x' in selecting a method for function 'print': 'arg' must be of length 1
  Backtrace:
       ▆
    1. ├─testthat::expect_snapshot(res) at test-analyze_variables.R:293:3
    2. │ └─testthat:::expect_snapshot_(...)
    3. │   ├─testthat:::with_is_snapshotting(...)
    4. │   └─testthat:::verify_exec(quo_get_expr(x), quo_get_env(x), replay)
    5. │     └─evaluate::evaluate(source, envir = env, new_device = FALSE, output_handler = handler)
    6. │       ├─base::withRestarts(...)
    7. │       │ └─base (local) withRestartList(expr, restarts)
    8. │       │   ├─base (local) withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])
    9. │       │   │ └─base (local) doWithOneRestart(return(expr), restart)
   10. │       │   └─base (local) withRestartList(expr, restarts[-nr])
   11. │       │     └─base (local) withOneRestart(expr, restarts[[1L]])
   12. │       │       └─base (local) doWithOneRestart(return(expr), restart)
   13. │       ├─evaluate:::with_handlers(...)
   14. │       │ ├─base::eval(call)
   15. │       │ │ └─base::eval(call)
   16. │       │ └─base::withCallingHandlers(...)
   17. │       └─watcher$print_value(ev$value, ev$visible, envir)
   18. │         ├─base::withVisible(handle_value(handler, value, visible, envir))
   19. │         └─evaluate:::handle_value(handler, value, visible, envir)
   20. │           ├─handler$value(value)
   21. │           └─testthat:::testthat_print.default(value)
   22. │             ├─base::print(x)
   23. │             └─rtables:::print.RowsVerticalSection(x)
   24. │               ├─base::print(...)
   25. │               ├─base::data.frame(...)
   26. │               └─base::vapply(x, format_rcell, character(1))
   27. │                 └─rtables (local) FUN(X[[i]], ...)
   28. │                   └─formatters::format_value(...)
   29. │                     └─base::match.arg(round_type)
   30. │                       └─base::stop(gettextf("'%s' must be of length 1", "arg"), domain = NA)
   31. └─base::.handleSimpleError(...)
   32.   └─base (local) h(simpleError(msg, call))
  
  Error ('test-analyze_variables.R:310:3'): `analyze_vars` works with healthy input, default `na_rm = TRUE`.
  Error in `match.arg(round_type)`: 'arg' must be of length 1
  Backtrace:
       ▆
    1. └─rtables::build_table(l, df = dta_test) at test-analyze_variables.R:310:3
    2.   └─rtables::update_ref_indexing(tab)
    3.     ├─formatters::make_row_df(tt)
    4.     └─rtables::make_row_df(tt)
    5.       └─rtables (local) .local(...)
    6.         ├─formatters::make_row_df(...)
    7.         └─rtables::make_row_df(...)
    8.           └─rtables (local) .local(...)
    9.             ├─formatters::pagdfrow(...)
   10.             │ └─base::data.frame(...)
   11.             ├─formatters::nlines(...)
   12.             └─rtables::nlines(...)
   13.               ├─base::as.vector(get_formatted_cells(x))
   14.               ├─rtables::get_formatted_cells(x)
   15.               └─rtables::get_formatted_cells(x)
   16.                 ├─base::matrix(...)
   17.                 ├─base::unlist(...)
   18.                 └─base::Map(...)
   19.                   └─base::mapply(FUN = f, ..., SIMPLIFY = FALSE)
   20.                     └─rtables (local) `<fn>`(val = dots[[1L]][[1L]], spn = dots[[2L]][[1L]], shelli = dots[[3L]][[1L]])
   21.                       └─rtables::format_rcell(...)
   22.                         └─formatters::format_value(...)
   23.                           └─base::match.arg(round_type)
  
  Error ('test-analyze_variables.R:325:3'): `analyze_vars` works with healthy input, and control function.
  Error in `match.arg(round_type)`: 'arg' must be of length 1
  Backtrace:
       ▆
    1. └─rtables::build_table(l, df = dta_test) at test-analyze_variables.R:325:3
    2.   └─rtables::update_ref_indexing(tab)
    3.     ├─formatters::make_row_df(tt)
    4.     └─rtables::make_row_df(tt)
    5.       └─rtables (local) .local(...)
    6.         ├─formatters::make_row_df(...)
    7.         └─rtables::make_row_df(...)
    8.           └─rtables (local) .local(...)
    9.             ├─formatters::pagdfrow(...)
   10.             │ └─base::data.frame(...)
   11.             ├─formatters::nlines(...)
   12.             └─rtables::nlines(...)
   13.               ├─base::as.vector(get_formatted_cells(x))
   14.               ├─rtables::get_formatted_cells(x)
   15.               └─rtables::get_formatted_cells(x)
   16.                 ├─base::matrix(...)
   17.                 ├─base::unlist(...)
   18.                 └─base::Map(...)
   19.                   └─base::mapply(FUN = f, ..., SIMPLIFY = FALSE)
   20.                     └─rtables (local) `<fn>`(val = dots[[1L]][[1L]], spn = dots[[2L]][[1L]], shelli = dots[[3L]][[1L]])
   21.                       └─rtables::format_rcell(...)
   22.                         └─formatters::format_value(...)
   23.                           └─base::match.arg(round_type)
  
  Error ('test-analyze_variables.R:336:3'): `analyze_vars` works with healthy input, alternative `na_rm = FALSE`
  Error in `match.arg(round_type)`: 'arg' must be of length 1
  Backtrace:
       ▆
    1. └─rtables::build_table(l, df = dta_test) at test-analyze_variables.R:336:3
    2.   └─rtables::update_ref_indexing(tab)
    3.     ├─formatters::make_row_df(tt)
    4.     └─rtables::make_row_df(tt)
    5.       └─rtables (local) .local(...)
    6.         ├─formatters::make_row_df(...)
    7.         └─rtables::make_row_df(...)
    8.           └─rtables (local) .local(...)
    9.             ├─formatters::pagdfrow(...)
   10.             │ └─base::data.frame(...)
   11.             ├─formatters::nlines(...)
   12.             └─rtables::nlines(...)
   13.               ├─base::as.vector(get_formatted_cells(x))
   14.               ├─rtables::get_formatted_cells(x)
   15.               └─rtables::get_formatted_cells(x)
   16.                 ├─base::matrix(...)
   17.                 ├─base::unlist(...)
   18.                 └─base::Map(...)
   19.                   └─base::mapply(FUN = f, ..., SIMPLIFY = FALSE)
   20.                     └─rtables (local) `<fn>`(val = dots[[1L]][[1L]], spn = dots[[2L]][[1L]], shelli = dots[[3L]][[1L]])
   21.                       └─rtables::format_rcell(...)
   22.                         └─formatters::format_value(...)
   23.                           └─base::match.arg(round_type)
  
  Error ('test-analyze_variables.R:345:3'): `analyze_vars` works with healthy factor input
  Error in `match.arg(round_type)`: 'arg' must be of length 1
  Backtrace:
       ▆
    1. ├─basic_table() %>% analyze_vars(vars = "foo") %>% ... at test-analyze_variables.R:345:3
    2. └─rtables::build_table(., dta)
    3.   └─rtables::update_ref_indexing(tab)
    4.     ├─formatters::make_row_df(tt)
    5.     └─rtables::make_row_df(tt)
    6.       └─rtables (local) .local(...)
    7.         ├─formatters::make_row_df(...)
    8.         └─rtables::make_row_df(...)
    9.           └─rtables (local) .local(...)
   10.             ├─formatters::pagdfrow(...)
   11.             │ └─base::data.frame(...)
   12.             ├─formatters::nlines(...)
   13.             └─rtables::nlines(...)
   14.               ├─base::as.vector(get_formatted_cells(x))
   15.               ├─rtables::get_formatted_cells(x)
   16.               └─rtables::get_formatted_cells(x)
   17.                 ├─base::matrix(...)
   18.                 ├─base::unlist(...)
   19.                 └─base::Map(...)
   20.                   └─base::mapply(FUN = f, ..., SIMPLIFY = FALSE)
   21.                     └─rtables (local) `<fn>`(val = dots[[1L]][[1L]], spn = dots[[2L]][[1L]], shelli = dots[[3L]][[1L]])
   22.                       └─rtables::format_rcell(...)
   23.                         └─formatters::format_value(...)
   24.                           └─base::match.arg(round_type)
  
  Error ('test-analyze_variables.R:356:3'): `analyze_vars` works with healthy factor input, alternative `na_rm = FALSE`
  Error in `match.arg(round_type)`: 'arg' must be of length 1
  Backtrace:
       ▆
    1. ├─... %>% build_table(dta) at test-analyze_variables.R:356:3
    2. └─rtables::build_table(., dta)
    3.   └─rtables::update_ref_indexing(tab)
    4.     ├─formatters::make_row_df(tt)
    5.     └─rtables::make_row_df(tt)
    6.       └─rtables (local) .local(...)
    7.         ├─formatters::make_row_df(...)
    8.         └─rtables::make_row_df(...)
    9.           └─rtables (local) .local(...)
   10.             ├─formatters::pagdfrow(...)
   11.             │ └─base::data.frame(...)
   12.             ├─formatters::nlines(...)
   13.             └─rtables::nlines(...)
   14.               ├─base::as.vector(get_formatted_cells(x))
   15.               ├─rtables::get_formatted_cells(x)
   16.               └─rtables::get_formatted_cells(x)
   17.                 ├─base::matrix(...)
   18.                 ├─base::unlist(...)
   19.                 └─base::Map(...)
   20.                   └─base::mapply(FUN = f, ..., SIMPLIFY = FALSE)
   21.                     └─rtables (local) `<fn>`(val = dots[[1L]][[1L]], spn = dots[[2L]][[1L]], shelli = dots[[3L]][[1L]])
   22.                       └─rtables::format_rcell(...)
   23.                         └─formatters::format_value(...)
   24.                           └─base::match.arg(round_type)
  
  Error ('test-analyze_variables.R:380:3'): `analyze_vars` works with factors and different denominators
  Error in `match.arg(round_type)`: 'arg' must be of length 1
  Backtrace:
       ▆
    1. ├─start %>% analyze_vars("RACE", denom = "n") %>% ... at test-analyze_variables.R:380:3
    2. └─rtables::build_table(., DM)
    3.   └─rtables::update_ref_indexing(tab)
    4.     ├─formatters::make_row_df(tt)
    5.     └─rtables::make_row_df(tt)
    6.       └─rtables (local) .local(...)
    7.         ├─formatters::make_row_df(...)
    8.         └─rtables::make_row_df(...)
    9.           └─rtables (local) .local(...)
   10.             ├─formatters::make_row_df(...)
   11.             └─rtables::make_row_df(...)
   12.               └─rtables (local) .local(...)
   13.                 ├─formatters::make_row_df(...)
   14.                 └─rtables::make_row_df(...)
   15.                   └─rtables (local) .local(...)
   16.                     ├─formatters::pagdfrow(...)
   17.                     │ └─base::data.frame(...)
   18.                     ├─formatters::nlines(...)
   19.                     └─rtables::nlines(...)
   20.                       ├─base::as.vector(get_formatted_cells(x))
   21.                       ├─rtables::get_formatted_cells(x)
   22.                       └─rtables::get_formatted_cells(x)
   23.                         ├─base::matrix(...)
   24.                         ├─base::unlist(...)
   25.                         └─base::Map(...)
   26.                           └─base::mapply(FUN = f, ..., SIMPLIFY = FALSE)
   27.                             └─rtables (local) `<fn>`(val = dots[[1L]][[1L]], spn = dots[[2L]][[1L]], shelli = dots[[3L]][[1L]])
   28.                               └─rtables::format_rcell(...)
   29.                                 └─formatters::format_value(...)
   30.                                   └─base::match.arg(round_type)
  
  Error ('test-analyze_variables.R:400:3'): analyze_vars works in demographic table example
  Error in `match.arg(round_type)`: 'arg' must be of length 1
  Backtrace:
       ▆
    1. ├─... %>% build_table(DM) at test-analyze_variables.R:400:3
    2. └─rtables::build_table(., DM)
    3.   └─rtables::update_ref_indexing(tab)
    4.     ├─formatters::make_row_df(tt)
    5.     └─rtables::make_row_df(tt)
    6.       └─rtables (local) .local(...)
    7.         ├─formatters::make_row_df(...)
    8.         └─rtables::make_row_df(...)
    9.           └─rtables (local) .local(...)
   10.             ├─formatters::make_row_df(...)
   11.             └─rtables::make_row_df(...)
   12.               └─rtables (local) .local(...)
   13.                 ├─formatters::make_row_df(...)
   14.                 └─rtables::make_row_df(...)
   15.                   └─rtables (local) .local(...)
   16.                     ├─formatters::pagdfrow(...)
   17.                     │ └─base::data.frame(...)
   18.                     ├─formatters::nlines(...)
   19.                     └─rtables::nlines(...)
   20.                       ├─base::as.vector(get_formatted_cells(x))
   21.                       ├─rtables::get_formatted_cells(x)
   22.                       └─rtables::get_formatted_cells(x)
   23.                         ├─base::matrix(...)
   24.                         ├─base::unlist(...)
   25.                         └─base::Map(...)
   26.                           └─base::mapply(FUN = f, ..., SIMPLIFY = FALSE)
   27.                             └─rtables (local) `<fn>`(val = dots[[1L]][[1L]], spn = dots[[2L]][[1L]], shelli = dots[[3L]][[1L]])
   28.                               └─rtables::format_rcell(...)
   29.                                 └─formatters::format_value(...)
   30.                                   └─base::match.arg(round_type)
  
  Error ('test-analyze_variables.R:418:3'): `analyze_vars` works with character input and gives the same result as with factor
  Error in `match.arg(round_type)`: 'arg' must be of length 1
  Backtrace:
       ▆
    1. ├─testthat::expect_warning(result <- build_table(l, dta)) at test-analyze_variables.R:418: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. └─rtables::build_table(l, dta)
    8.   └─rtables::update_ref_indexing(tab)
    9.     ├─formatters::make_row_df(tt)
   10.     └─rtables::make_row_df(tt)
   11.       └─rtables (local) .local(...)
   12.         ├─formatters::make_row_df(...)
   13.         └─rtables::make_row_df(...)
   14.           └─rtables (local) .local(...)
   15.             ├─formatters::pagdfrow(...)
   16.             │ └─base::data.frame(...)
   17.             ├─formatters::nlines(...)
   18.             └─rtables::nlines(...)
   19.               ├─base::as.vector(get_formatted_cells(x))
   20.               ├─rtables::get_formatted_cells(x)
   21.               └─rtables::get_formatted_cells(x)
   22.                 ├─base::matrix(...)
   23.                 ├─base::unlist(...)
   24.                 └─base::Map(...)
   25.                   └─base::mapply(FUN = f, ..., SIMPLIFY = FALSE)
   26.                     └─rtables (local) `<fn>`(val = dots[[1L]][[1L]], spn = dots[[2L]][[1L]], shelli = dots[[3L]][[1L]])
   27.                       └─rtables::format_rcell(...)
   28.                         └─formatters::format_value(...)
   29.                           └─base::match.arg(round_type)
  
  Error ('test-analyze_variables.R:442:3'): `analyze_vars` does not work with sparse character input due to missing statistics
  Error in `match.arg(round_type)`: 'arg' must be of length 1
  Backtrace:
       ▆
    1. ├─testthat::expect_silent(build_table(l, dta_factor)) at test-analyze_variables.R:442:3
    2. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ ├─withr::with_output_sink(...)
    5. │   │ │ └─base::force(code)
    6. │   │ ├─base::withCallingHandlers(...)
    7. │   │ └─base::withVisible(code)
    8. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    9. └─rtables::build_table(l, dta_factor)
   10.   └─rtables::update_ref_indexing(tab)
   11.     ├─formatters::make_row_df(tt)
   12.     └─rtables::make_row_df(tt)
   13.       └─rtables (local) .local(...)
   14.         ├─formatters::make_row_df(...)
   15.         └─rtables::make_row_df(...)
   16.           └─rtables (local) .local(...)
   17.             ├─formatters::pagdfrow(...)
   18.             │ └─base::data.frame(...)
   19.             ├─formatters::nlines(...)
   20.             └─rtables::nlines(...)
   21.               ├─base::as.vector(get_formatted_cells(x))
   22.               ├─rtables::get_formatted_cells(x)
   23.               └─rtables::get_formatted_cells(x)
   24.                 ├─base::matrix(...)
   25.                 ├─base::unlist(...)
   26.                 └─base::Map(...)
   27.                   └─base::mapply(FUN = f, ..., SIMPLIFY = FALSE)
   28.                     └─rtables (local) `<fn>`(val = dots[[1L]][[1L]], spn = dots[[2L]][[1L]], shelli = dots[[3L]][[1L]])
   29.                       └─rtables::format_rcell(...)
   30.                         └─formatters::format_value(...)
   31.                           └─base::match.arg(round_type)
  
  Error ('test-analyze_variables.R:450:3'): `analyze_vars` works with logical input
  Error in `match.arg(round_type)`: 'arg' must be of length 1
  Backtrace:
       ▆
    1. ├─basic_table() %>% analyze_vars(vars = "boo") %>% ... at test-analyze_variables.R:450:3
    2. └─rtables::build_table(., dta)
    3.   └─rtables::update_ref_indexing(tab)
    4.     ├─formatters::make_row_df(tt)
    5.     └─rtables::make_row_df(tt)
    6.       └─rtables (local) .local(...)
    7.         ├─formatters::make_row_df(...)
    8.         └─rtables::make_row_df(...)
    9.           └─rtables (local) .local(...)
   10.             ├─formatters::pagdfrow(...)
   11.             │ └─base::data.frame(...)
   12.             ├─formatters::nlines(...)
   13.             └─rtables::nlines(...)
   14.               ├─base::as.vector(get_formatted_cells(x))
   15.               ├─rtables::get_formatted_cells(x)
   16.               └─rtables::get_formatted_cells(x)
   17.                 ├─base::matrix(...)
   18.                 ├─base::unlist(...)
   19.                 └─base::Map(...)
   20.                   └─base::mapply(FUN = f, ..., SIMPLIFY = FALSE)
   21.                     └─rtables (local) `<fn>`(val = dots[[1L]][[1L]], spn = dots[[2L]][[1L]], shelli = dots[[3L]][[1L]])
   22.                       └─rtables::format_rcell(...)
   23.                         └─formatters::format_value(...)
   24.                           └─base::match.arg(round_type)
  
  Error ('test-analyze_variables.R:461:3'): `analyze_vars` works with healthy logical input, alternative `na_rm = FALSE`
  Error in `match.arg(round_type)`: 'arg' must be of length 1
  Backtrace:
       ▆
    1. ├─... %>% build_table(dta) at test-analyze_variables.R:461:3
    2. └─rtables::build_table(., dta)
    3.   └─rtables::update_ref_indexing(tab)
    4.     ├─formatters::make_row_df(tt)
    5.     └─rtables::make_row_df(tt)
    6.       └─rtables (local) .local(...)
    7.         ├─formatters::make_row_df(...)
    8.         └─rtables::make_row_df(...)
    9.           └─rtables (local) .local(...)
   10.             ├─formatters::pagdfrow(...)
   11.             │ └─base::data.frame(...)
   12.             ├─formatters::nlines(...)
   13.             └─rtables::nlines(...)
   14.               ├─base::as.vector(get_formatted_cells(x))
   15.               ├─rtables::get_formatted_cells(x)
   16.               └─rtables::get_formatted_cells(x)
   17.                 ├─base::matrix(...)
   18.                 ├─base::unlist(...)
   19.                 └─base::Map(...)
   20.                   └─base::mapply(FUN = f, ..., SIMPLIFY = FALSE)
   21.                     └─rtables (local) `<fn>`(val = dots[[1L]][[1L]], spn = dots[[2L]][[1L]], shelli = dots[[3L]][[1L]])
   22.                       └─rtables::format_rcell(...)
   23.                         └─formatters::format_value(...)
   24.                           └─base::match.arg(round_type)
  
  Error ('test-analyze_variables.R:486:3'): `analyze_vars` works with empty named numeric variables
  Error in `match.arg(round_type)`: 'arg' must be of length 1
  Backtrace:
       ▆
    1. ├─... %>% build_table(dta) at test-analyze_variables.R:486:3
    2. └─rtables::build_table(., dta)
    3.   └─rtables::update_ref_indexing(tab)
    4.     ├─formatters::make_row_df(tt)
    5.     └─rtables::make_row_df(tt)
    6.       └─rtables (local) .local(...)
    7.         ├─formatters::make_row_df(...)
    8.         └─rtables::make_row_df(...)
    9.           └─rtables (local) .local(...)
   10.             ├─formatters::pagdfrow(...)
   11.             │ └─base::data.frame(...)
   12.             ├─formatters::nlines(...)
   13.             └─rtables::nlines(...)
   14.               ├─base::as.vector(get_formatted_cells(x))
   15.               ├─rtables::get_formatted_cells(x)
   16.               └─rtables::get_formatted_cells(x)
   17.                 ├─base::matrix(...)
   18.                 ├─base::unlist(...)
   19.                 └─base::Map(...)
   20.                   └─base::mapply(FUN = f, ..., SIMPLIFY = FALSE)
   21.                     └─rtables (local) `<fn>`(val = dots[[1L]][[1L]], spn = dots[[2L]][[1L]], shelli = dots[[3L]][[1L]])
   22.                       └─rtables::format_rcell(...)
   23.                         └─formatters::format_value(...)
   24.                           └─base::match.arg(round_type)
  
  Error ('test-analyze_variables.R:503:3'): analyze_vars 'na_str' argument works as expected
  Error in `match.arg(round_type)`: 'arg' must be of length 1
  Backtrace:
       ▆
    1. ├─... %>% build_table(dta) at test-analyze_variables.R:503:3
    2. └─rtables::build_table(., dta)
    3.   └─rtables::update_ref_indexing(tab)
    4.     ├─formatters::make_row_df(tt)
    5.     └─rtables::make_row_df(tt)
    6.       └─rtables (local) .local(...)
    7.         ├─formatters::make_row_df(...)
    8.         └─rtables::make_row_df(...)
    9.           └─rtables (local) .local(...)
   10.             ├─formatters::make_row_df(...)
   11.             └─rtables::make_row_df(...)
   12.               └─rtables (local) .local(...)
   13.                 ├─formatters::make_row_df(...)
   14.                 └─rtables::make_row_df(...)
   15.                   └─rtables (local) .local(...)
   16.                     ├─formatters::pagdfrow(...)
   17.                     │ └─base::data.frame(...)
   18.                     ├─formatters::nlines(...)
   19.                     └─rtables::nlines(...)
   20.                       ├─base::as.vector(get_formatted_cells(x))
   21.                       ├─rtables::get_formatted_cells(x)
   22.                       └─rtables::get_formatted_cells(x)
   23.                         ├─base::matrix(...)
   24.                         ├─base::unlist(...)
   25.                         └─base::Map(...)
   26.                           └─base::mapply(FUN = f, ..., SIMPLIFY = FALSE)
   27.                             └─rtables (local) `<fn>`(val = dots[[1L]][[1L]], spn = dots[[2L]][[1L]], shelli = dots[[3L]][[1L]])
   28.                               └─rtables::format_rcell(...)
   29.                                 └─formatters::format_value(...)
   30.                                   └─base::match.arg(round_type)
  
  Error ('test-analyze_variables.R:530:3'): analyze_vars works correctly with auto formats
  Error in `match.arg(round_type)`: 'arg' must be of length 1
  Backtrace:
       ▆
    1. ├─... %>% build_table(dt) at test-analyze_variables.R:530:3
    2. └─rtables::build_table(., dt)
    3.   └─rtables::update_ref_indexing(tab)
    4.     ├─formatters::make_row_df(tt)
    5.     └─rtables::make_row_df(tt)
    6.       └─rtables (local) .local(...)
    7.         ├─formatters::make_row_df(...)
    8.         └─rtables::make_row_df(...)
    9.           └─rtables (local) .local(...)
   10.             ├─formatters::pagdfrow(...)
   11.             │ └─base::data.frame(...)
   12.             ├─formatters::nlines(...)
   13.             └─rtables::nlines(...)
   14.               ├─base::as.vector(get_formatted_cells(x))
   15.               ├─rtables::get_formatted_cells(x)
   16.               └─rtables::get_formatted_cells(x)
   17.                 ├─base::matrix(...)
   18.                 ├─base::unlist(...)
   19.                 └─base::Map(...)
   20.                   └─base::mapply(FUN = f, ..., SIMPLIFY = FALSE)
   21.                     └─rtables (local) `<fn>`(val = dots[[1L]][[1L]], spn = dots[[2L]][[1L]], shelli = dots[[3L]][[1L]])
   22.                       └─rtables::format_rcell(...)
   23.                         └─formatters::format_value(...)
   24.                           └─base::match.arg(round_type)
  
  Error ('test-analyze_variables.R:544:3'): analyze_vars works well with additional stat names (.stat_names)
  Error in `match.arg(round_type)`: 'arg' must be of length 1
  Backtrace:
       ▆
    1. ├─... %>% as_result_df(make_ard = TRUE) at test-analyze_variables.R:544:3
    2. ├─rtables::as_result_df(., make_ard = TRUE)
    3. │ └─checkmate::assert_class(tt, "VTableTree")
    4. │   └─checkmate::checkClass(x, classes, ordered, null.ok)
    5. └─rtables::build_table(., dt)
    6.   └─rtables::update_ref_indexing(tab)
    7.     ├─formatters::make_row_df(tt)
    8.     └─rtables::make_row_df(tt)
    9.       └─rtables (local) .local(...)
   10.         ├─formatters::make_row_df(...)
   11.         └─rtables::make_row_df(...)
   12.           └─rtables (local) .local(...)
   13.             ├─formatters::pagdfrow(...)
   14.             │ └─base::data.frame(...)
   15.             ├─formatters::nlines(...)
   16.             └─rtables::nlines(...)
   17.               ├─base::as.vector(get_formatted_cells(x))
   18.               ├─rtables::get_formatted_cells(x)
   19.               └─rtables::get_formatted_cells(x)
   20.                 ├─base::matrix(...)
   21.                 ├─base::unlist(...)
   22.                 └─base::Map(...)
   23.                   └─base::mapply(FUN = f, ..., SIMPLIFY = FALSE)
   24.                     └─rtables (local) `<fn>`(val = dots[[1L]][[1L]], spn = dots[[2L]][[1L]], shelli = dots[[3L]][[1L]])
   25.                       └─rtables::format_rcell(...)
   26.                         └─formatters::format_value(...)
   27.                           └─base::match.arg(round_type)
  
  Error ('test-analyze_variables.R:559:3'): analyze_vars works well with additional stat names (.stat_names) and stats (custom fnc)
  Error in `match.arg(round_type)`: 'arg' must be of length 1
  Backtrace:
       ▆
    1. ├─... %>% build_table(dt) at test-analyze_variables.R:559:3
    2. └─rtables::build_table(., dt)
    3.   └─rtables::update_ref_indexing(tab)
    4.     ├─formatters::make_row_df(tt)
    5.     └─rtables::make_row_df(tt)
    6.       └─rtables (local) .local(...)
    7.         ├─formatters::make_row_df(...)
    8.         └─rtables::make_row_df(...)
    9.           └─rtables (local) .local(...)
   10.             ├─formatters::make_row_df(...)
   11.             └─rtables::make_row_df(...)
   12.               └─rtables (local) .local(...)
   13.                 ├─formatters::pagdfrow(...)
   14.                 │ └─base::data.frame(...)
   15.                 ├─formatters::nlines(...)
   16.                 └─rtables::nlines(...)
   17.                   ├─base::as.vector(get_formatted_cells(x))
   18.                   ├─rtables::get_formatted_cells(x)
   19.                   └─rtables::get_formatted_cells(x)
   20.                     ├─base::matrix(...)
   21.                     ├─base::unlist(...)
   22.                     └─base::Map(...)
   23.                       └─base::mapply(FUN = f, ..., SIMPLIFY = FALSE)
   24.                         └─rtables (local) `<fn>`(val = dots[[1L]][[1L]], spn = dots[[2L]][[1L]], shelli = dots[[3L]][[1L]])
   25.                           └─rtables::format_rcell(...)
   26.                             └─formatters::format_value(...)
   27.                               └─base::match.arg(round_type)
  
  Error ('test-analyze_variables.R:624:3'): analyze_vars keeps the order of mixed custom fnc and defaults
  Error in `match.arg(round_type)`: 'arg' must be of length 1
  Backtrace:
       ▆
    1. ├─... %>% build_table(tern_ex_adsl) at test-analyze_variables.R:624:3
    2. └─rtables::build_table(., tern_ex_adsl)
    3.   └─rtables::update_ref_indexing(tab)
    4.     ├─formatters::make_row_df(tt)
    5.     └─rtables::make_row_df(tt)
    6.       └─rtables (local) .local(...)
    7.         ├─formatters::make_row_df(...)
    8.         └─rtables::make_row_df(...)
    9.           └─rtables (local) .local(...)
   10.             ├─formatters::pagdfrow(...)
   11.             │ └─base::data.frame(...)
   12.             ├─formatters::nlines(...)
   13.             └─rtables::nlines(...)
   14.               ├─base::as.vector(get_formatted_cells(x))
   15.               ├─rtables::get_formatted_cells(x)
   16.               └─rtables::get_formatted_cells(x)
   17.                 ├─base::matrix(...)
   18.                 ├─base::unlist(...)
   19.                 └─base::Map(...)
   20.                   └─base::mapply(FUN = f, ..., SIMPLIFY = FALSE)
   21.                     └─rtables (local) `<fn>`(val = dots[[1L]][[1L]], spn = dots[[2L]][[1L]], shelli = dots[[3L]][[1L]])
   22.                       └─rtables::format_rcell(...)
   23.                         └─formatters::format_value(...)
   24.                           └─base::match.arg(round_type)
  
  Error ('test-analyze_variables.R:662:3'): analyze_vars warnings for geom_verbose work
  Error in `match.arg(round_type)`: 'arg' must be of length 1
  Backtrace:
       ▆
    1. ├─testthat::expect_warning(...) at test-analyze_variables.R:662: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. ├─... %>% build_table(tmp_df)
    8. └─rtables::build_table(., tmp_df)
    9.   └─rtables::update_ref_indexing(tab)
   10.     ├─formatters::make_row_df(tt)
   11.     └─rtables::make_row_df(tt)
   12.       └─rtables (local) .local(...)
   13.         ├─formatters::make_row_df(...)
   14.         └─rtables::make_row_df(...)
   15.           └─rtables (local) .local(...)
   16.             ├─formatters::pagdfrow(...)
   17.             │ └─base::data.frame(...)
   18.             ├─formatters::nlines(...)
   19.             └─rtables::nlines(...)
   20.               ├─base::as.vector(get_formatted_cells(x))
   21.               ├─rtables::get_formatted_cells(x)
   22.               └─rtables::get_formatted_cells(x)
   23.                 ├─base::matrix(...)
   24.                 ├─base::unlist(...)
   25.                 └─base::Map(...)
   26.                   └─base::mapply(FUN = f, ..., SIMPLIFY = FALSE)
   27.                     └─rtables (local) `<fn>`(val = dots[[1L]][[1L]], spn = dots[[2L]][[1L]], shelli = dots[[3L]][[1L]])
   28.                       └─rtables::format_rcell(...)
   29.                         └─formatters::format_value(...)
   30.                           └─base::match.arg(round_type)
  
  Maximum number of failures exceeded; quitting.
  ℹ Increase this number with (e.g.) `testthat::set_max_fails(Inf)` 
  
                                                                                  Error:
  ! Test failures.
  Execution halted