Running ‘testthat.R’ [9s/14s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(manymodelr)
  Loading required package: caret
  Loading required package: ggplot2
  Loading required package: lattice
  Loading required package: Metrics
  
  Attaching package: 'Metrics'
  
  The following objects are masked from 'package:caret':
  
      precision, recall
  
  Loading required package: e1071
  Welcome to manymodelr. This is manymodelr version 0.3.7.
   Please file issues and feedback at https://www.github.com/Nelson-Gon/manymodelr/issues
  Turn this message off using 'suppressPackageStartupMessages(library(manymodelr))'
   Happy Modelling! :)
  > data("yields", package = "manymodelr")
  > test_check("manymodelr")
  Grouped By[1]:	normal 
   Grouped By[2]:	normal weight 
   [1] ### Ordered by height ###
  [1] ### Ordered by height ###
  [ FAIL 2 | WARN 4 | SKIP 0 | PASS 94 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure (test_na_replace.R:21:13): NA replacement works ─────────────────────
  `na_replace(test_data)` threw an error with unexpected message.
  Expected match: "One of how or value should be provided"
  Actual message: "number of characters is not computable in \"bytes\" encoding, element 1"
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test_na_replace.R:21:12
    2. │ └─testthat:::quasi_capture(...)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ └─base::withCallingHandlers(...)
    5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    6. ├─manymodelr::na_replace(test_data)
    7. ├─manymodelr:::na_replace.data.frame(test_data)
    8. │ └─df %>% ...
    9. ├─dplyr::mutate(...)
   10. ├─dplyr:::mutate.data.frame(...)
   11. │ └─dplyr:::mutate_cols(.data, dplyr_quosures(...), caller_env = caller_env())
   12. │   ├─base::withCallingHandlers(...)
   13. │   ├─base::withCallingHandlers(...)
   14. │   └─mask$eval_all_mutate(quo)
   15. ├─manymodelr:::na_replace.character(ID, how = how, value = value)
   16. │ └─base::stop("One of how or value should be provided")
   17. ├─base::.handleSimpleError(...)
   18. │ └─dplyr (local) h(simpleError(msg, call))
   19. │   └─rlang::abort(msg, call = call("across"), parent = cnd)
   20. │     └─rlang:::signal_abort(cnd, .file)
   21. │       └─base::signalCondition(cnd)
   22. └─dplyr (local) `<fn>`(`<rlng_rrr>`)
   23.   └─rlang::abort(...)
   24.     └─rlang:::signal_abort(cnd, .file)
   25.       └─base::signalCondition(cnd)
   26.         ├─base::conditionMessage(cond)
   27.         └─rlang:::conditionMessage.rlang_error(cond)
   28.           └─rlang::cnd_message(c)
   29.             └─rlang:::cnd_message_format_prefixed(cnd, parent = TRUE, warning = warning)
   30.               └─rlang:::cnd_message_format(cnd, ..., alert = alert)
   31.                 └─rlang (local) cli_format(glue_escape(lines))
   32.                   └─rlang:::.rlang_cli_format(x, cli::format_error)
   33.                     └─cli::cli_format(x, .envir = emptyenv())
   34.                       └─cli:::fmt(...)
   35.                         └─cli:::cli__fmt(rec, collapse, strip_newline, app)
   36.                           ├─base::do.call(app[[msg$type]], msg$args)
   37.                           └─cli (local) `<fn>`(text = `<named list>`, id = "cli-2553110-28", class = NULL)
   38.                             └─cli:::clii_bullets(app, text, id, class)
   39.                               └─base::lapply(...)
   40.                                 └─cli (local) FUN(X[[i]], ...)
   41.                                   └─app$text(text[[i]])
   42.                                     └─cli:::clii_text(app, text)
   43.                                       └─app$xtext(text)
   44.                                         └─cli:::clii__xtext(...)
   45.                                           └─cli::ansi_strwrap(text, exdent = exdent, width = app$get_width(extra = padding))
   46.                                             └─base::lapply(pars, ansi_trimws)
   47.                                               └─cli (local) FUN(X[[i]], ...)
  ── Failure (test_na_replace.R:37:15): Test grouped replacement ─────────────────
  `na_replace_grouped(test_data, group_by_cols = "ID", how = "mean")` threw an error with unexpected message.
  Expected match: "how should be one of ffill, samples, value or get_mode."
  Actual message: "number of characters is not computable in \"bytes\" encoding, element 1"
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test_na_replace.R:37:14
    2. │ └─testthat:::quasi_capture(...)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ └─base::withCallingHandlers(...)
    5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    6. ├─manymodelr::na_replace_grouped(...)
    7. │ ├─base::do.call(...)
    8. │ └─base::lapply(...)
    9. │   └─manymodelr (local) FUN(X[[i]], ...)
   10. │     ├─base::cbind(x[grouping_cols], na_replace(x[-grouping_cols], ...))
   11. │     │ └─base::cbind(deparse.level, ...)
   12. │     │   └─base::data.frame(..., check.names = FALSE)
   13. │     ├─manymodelr::na_replace(x[-grouping_cols], ...)
   14. │     └─manymodelr:::na_replace.data.frame(x[-grouping_cols], ...)
   15. │       └─df %>% ...
   16. ├─dplyr::mutate(...)
   17. ├─dplyr:::mutate.data.frame(...)
   18. │ └─dplyr:::mutate_cols(.data, dplyr_quosures(...), caller_env = caller_env())
   19. │   ├─base::withCallingHandlers(...)
   20. │   ├─base::withCallingHandlers(...)
   21. │   └─mask$eval_all_mutate(quo)
   22. ├─manymodelr:::na_replace.character(Val, how = how, value = value)
   23. │ └─base::stop("how should be one of ffill, samples, value or get_mode.")
   24. ├─base::.handleSimpleError(...)
   25. │ └─dplyr (local) h(simpleError(msg, call))
   26. │   └─rlang::abort(msg, call = call("across"), parent = cnd)
   27. │     └─rlang:::signal_abort(cnd, .file)
   28. │       └─base::signalCondition(cnd)
   29. └─dplyr (local) `<fn>`(`<rlng_rrr>`)
   30.   └─rlang::abort(...)
   31.     └─rlang:::signal_abort(cnd, .file)
   32.       └─base::signalCondition(cnd)
   33.         ├─base::conditionMessage(cond)
   34.         └─rlang:::conditionMessage.rlang_error(cond)
   35.           └─rlang::cnd_message(c)
   36.             └─rlang:::cnd_message_format_prefixed(cnd, parent = TRUE, warning = warning)
   37.               └─rlang:::cnd_message_format(cnd, ..., alert = alert)
   38.                 └─rlang (local) cli_format(glue_escape(lines))
   39.                   └─rlang:::.rlang_cli_format(x, cli::format_error)
   40.                     └─cli::cli_format(x, .envir = emptyenv())
   41.                       └─cli:::fmt(...)
   42.                         └─cli:::cli__fmt(rec, collapse, strip_newline, app)
   43.                           ├─base::do.call(app[[msg$type]], msg$args)
   44.                           └─cli (local) `<fn>`(text = `<named list>`, id = "cli-2553110-55", class = NULL)
   45.                             └─cli:::clii_bullets(app, text, id, class)
   46.                               └─base::lapply(...)
   47.                                 └─cli (local) FUN(X[[i]], ...)
   48.                                   └─app$text(text[[i]])
   49.                                     └─cli:::clii_text(app, text)
   50.                                       └─app$xtext(text)
   51.                                         └─cli:::clii__xtext(...)
   52.                                           └─cli::ansi_strwrap(text, exdent = exdent, width = app$get_width(extra = padding))
   53.                                             └─base::lapply(pars, ansi_trimws)
   54.                                               └─cli (local) FUN(X[[i]], ...)
  
  [ FAIL 2 | WARN 4 | SKIP 0 | PASS 94 ]
  Error: Test failures
  Execution halted