Running 'testthat.R' [4s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > if (requireNamespace("testthat", quietly = TRUE)) {
  +   library(testthat)
  +   library(rtables)
  +   test_check("rtables", reporter = "check")
  + }
  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
  
  
  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
  
  Error in `source_dir()`:
  ! Failed to evaluate './setup-fakedata.R'.
  Caused by error in `match.arg()`:
  ! 'arg' must be of length 1
  Backtrace:
       ▆
    1. ├─testthat::test_check("rtables", reporter = "check")
    2. │ └─testthat::test_dir(...)
    3. │   └─testthat:::test_files(...)
    4. │     └─testthat:::test_files_serial(...)
    5. │       └─testthat:::test_files_setup_state(...)
    6. │         └─testthat::source_test_setup(".", env)
    7. │           └─testthat::source_dir(path, "^setup.*\\.[rR]$", env = env, wrap = FALSE)
    8. │             └─base::lapply(...)
    9. │               └─testthat (local) FUN(X[[i]], ...)
   10. │                 └─testthat::source_file(...)
   11. │                   ├─base::withCallingHandlers(...)
   12. │                   └─base::eval(exprs, env)
   13. │                     └─base::eval(exprs, env)
   14. │                       └─rtables:::tt_to_test_wrapping() at ./setup-fakedata.R:182:1
   15. │                         └─... %>% build_table(trimmed_data) at ./setup-fakedata.R:169:3
   16. ├─rtables::build_table(., trimmed_data)
   17. │ └─rtables::update_ref_indexing(tab)
   18. │   ├─formatters::make_row_df(tt)
   19. │   └─rtables::make_row_df(tt)
   20. │     └─rtables (local) .local(...)
   21. │       ├─formatters::make_row_df(...)
   22. │       └─rtables::make_row_df(...)
   23. │         └─rtables (local) .local(...)
   24. │           ├─formatters::make_row_df(...)
   25. │           └─rtables::make_row_df(...)
   26. │             └─rtables (local) .local(...)
   27. │               ├─formatters::make_row_df(...)
   28. │               └─rtables::make_row_df(...)
   29. │                 └─rtables (local) .local(...)
   30. │                   ├─formatters::pagdfrow(...)
   31. │                   │ └─base::data.frame(...)
   32. │                   ├─formatters::nlines(...)
   33. │                   └─rtables::nlines(...)
   34. │                     ├─base::as.vector(get_formatted_cells(x))
   35. │                     ├─rtables::get_formatted_cells(x)
   36. │                     └─rtables::get_formatted_cells(x)
   37. │                       ├─base::matrix(...)
   38. │                       ├─base::unlist(...)
   39. │                       └─base::Map(...)
   40. │                         └─base::mapply(FUN = f, ..., SIMPLIFY = FALSE)
   41. │                           └─rtables (local) `<fn>`(val = dots[[1L]][[1L]], spn = dots[[2L]][[1L]], shelli = dots[[3L]][[1L]])
   42. │                             └─rtables::format_rcell(...)
   43. │                               └─formatters::format_value(...)
   44. │                                 └─base::match.arg(round_type)
   45. │                                   └─base::stop("'arg' must be of length 1")
   46. └─base::.handleSimpleError(...)
   47.   └─testthat (local) h(simpleError(msg, call))
   48.     └─cli::cli_abort(...)
   49.       └─rlang::abort(...)
  Execution halted