Running ‘testthat.R’ [39s/61s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(admiral)
  > 
  > test_check("admiral")
  [1] "N" "Y" NA 
  [ FAIL 1 | WARN 0 | SKIP 0 | PASS 449 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure (test-derive_param_tte.R:522:3): an error if issued set_values_to contains invalid expressions ──
  `derive_param_tte(...)` threw an error with unexpected message.
  Expected match: "Assigning new variables failed!\nset_values_to = \\(\n  PARAMCD = paste0\\(\"TTAE\", as.numeric\\(as.factor\\(AEDECOD\\)\\)\\)\n  PARAM = past\\(\"Time to First\", AEDECOD, \"Adverse Event\"\\)\n  PARCAT1 = TTAE\n  PARCAT2 = AEDECOD\n\\)\nError message:\n  .*"
  Actual message: "number of characters is not computable in \"bytes\" encoding, element 1"
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test-derive_param_tte.R:522:2
    2. │ └─testthat:::quasi_capture(...)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ └─base::withCallingHandlers(...)
    5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    6. └─admiral::derive_param_tte(...)
    7.   └─base::tryCatch(...)
    8.     └─base (local) tryCatchList(expr, classes, parentenv, handlers)
    9.       └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   10.         └─value[[3L]](cond)
   11.           ├─rlang::abort(...)
   12.           │ └─rlang::is_formula(message, scoped = TRUE, lhs = FALSE)
   13.           └─base::paste0(...)
   14.             ├─base::as.character(`<dply:::_>`)
   15.             └─rlang:::as.character.rlang_error(`<dply:::_>`)
   16.               ├─base::paste0(cnd_message(x, prefix = TRUE), "\n")
   17.               └─rlang::cnd_message(x, prefix = TRUE)
   18.                 └─rlang:::cnd_message_format_prefixed(cnd, ..., parent = FALSE)
   19.                   └─rlang:::cnd_message_format(cnd, ..., alert = alert)
   20.                     └─rlang (local) cli_format(glue_escape(lines))
   21.                       └─rlang:::.rlang_cli_format(x, cli::format_error)
   22.                         └─cli::cli_format(x, .envir = emptyenv())
   23.                           └─cli:::fmt(...)
   24.                             └─cli:::cli__fmt(rec, collapse, strip_newline, app)
   25.                               ├─base::do.call(app[[msg$type]], msg$args)
   26.                               └─cli (local) `<fn>`(text = `<named list>`, id = "cli-2553110-29", class = NULL)
   27.                                 └─cli:::clii_bullets(app, text, id, class)
   28.                                   └─base::lapply(...)
   29.                                     └─cli (local) FUN(X[[i]], ...)
   30.                                       └─app$text(text[[i]])
   31.                                         └─cli:::clii_text(app, text)
   32.                                           └─app$xtext(text)
   33.                                             └─cli:::clii__xtext(...)
   34.                                               └─cli::ansi_strwrap(text, exdent = exdent, width = app$get_width(extra = padding))
   35.                                                 └─base::lapply(pars, ansi_trimws)
   36.                                                   └─cli (local) FUN(X[[i]], ...)
  
  [ FAIL 1 | WARN 0 | SKIP 0 | PASS 449 ]
  Error: Test failures
  Execution halted