Running ‘testthat.R’ [106s/166s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(HLMdiag)
  
  Attaching package: 'HLMdiag'
  
  The following object is masked from 'package:stats':
  
      covratio
  
  > library(lme4)
  Loading required package: Matrix
  > library(nlme)
  
  Attaching package: 'nlme'
  
  The following object is masked from 'package:lme4':
  
      lmList
  
  > 
  > data(sleepstudy, package = 'lme4')
  > 
  > sleepstudy2 <- sleepstudy
  > sleepstudy2[7,1] <- NA
  > sleepstudy2[2,2] <- NA
  > 
  > 
  > test_check("HLMdiag")
  [ FAIL 2 | WARN 0 | SKIP 4 | PASS 359 ]
  
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  • On CRAN (4)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (test-hlm_augment.R:19:1): (code run outside of `test_that()`) ────────
  Error in `nchar(xs)`: number of characters is not computable in "bytes" encoding, element 1
  Backtrace:
       ▆
    1. ├─HLMdiag::hlm_augment(sleep.lmer, level = "Subject") at test-hlm_augment.R:19:0
    2. └─HLMdiag:::hlm_augment.lmerMod(sleep.lmer, level = "Subject")
    3.   ├─HLMdiag::hlm_resid(...)
    4.   └─HLMdiag:::hlm_resid.lmerMod(...)
    5.     ├─base::suppressMessages(...)
    6.     │ └─base::withCallingHandlers(...)
    7.     └─tibble::tibble(groups, eb.resid, ls.resid[, -1], .name_repair = "universal")
    8.       └─tibble:::tibble_quos(xs, .rows, .name_repair)
    9.         └─tibble:::set_repaired_names(output, repair_hint = TRUE, .name_repair = .name_repair)
   10.           ├─rlang::set_names(...)
   11.           └─tibble:::repaired_names(...)
   12.             ├─tibble:::subclass_name_repair_errors(...)
   13.             │ └─base::withCallingHandlers(...)
   14.             └─vctrs::vec_as_names(...)
   15.               └─vctrs (local) `<fn>`()
   16.                 └─vctrs:::as_universal_names(names = names, quiet = quiet)
   17.                   └─vctrs:::describe_repair(names, new_names)
   18.                     └─rlang::names_inform_repair(orig_names, names)
   19.                       └─rlang::inform(message = message, class = "rlib_message_name_repair")
   20.                         ├─base::withRestarts(...)
   21.                         │ └─base (local) withOneRestart(expr, restarts[[1L]])
   22.                         │   └─base (local) doWithOneRestart(return(expr), restart)
   23.                         └─base::signalCondition(cnd)
   24.                           ├─base::conditionMessage(cond)
   25.                           └─rlang:::conditionMessage.rlang_message(cond)
   26.                             └─rlang::cnd_message(c)
   27.                               └─rlang:::cnd_message_format(cnd, ...)
   28.                                 └─rlang (local) cli_format(glue_escape(lines))
   29.                                   └─rlang:::.rlang_cli_format(x, cli::format_message)
   30.                                     └─cli::cli_format(x, .envir = emptyenv())
   31.                                       └─cli:::fmt(...)
   32.                                         └─cli:::cli__fmt(rec, collapse, strip_newline, app)
   33.                                           ├─base::do.call(app[[msg$type]], msg$args)
   34.                                           └─cli (local) `<fn>`(text = `<named list>`, id = "cli-2553110-54", class = NULL)
   35.                                             └─cli:::clii_bullets(app, text, id, class)
   36.                                               └─base::lapply(...)
   37.                                                 └─cli (local) FUN(X[[i]], ...)
   38.                                                   └─app$text(text[[i]])
   39.                                                     └─cli:::clii_text(app, text)
   40.                                                       └─app$xtext(text)
   41.                                                         └─cli:::clii__xtext(...)
   42.                                                           └─cli::ansi_strwrap(text, exdent = exdent, width = app$get_width(extra = padding))
   43.                                                             └─base::lapply(pars, ansi_trimws)
   44.                                                               └─cli (local) FUN(X[[i]], ...)
  ── Error (test-hlm_resid.R:13:1): (code run outside of `test_that()`) ──────────
  Error in `nchar(xs)`: number of characters is not computable in "bytes" encoding, element 1
  Backtrace:
       ▆
    1. ├─HLMdiag::hlm_resid(bdf.lmer, level = "schoolNR") at test-hlm_resid.R:13:0
    2. └─HLMdiag:::hlm_resid.lmerMod(bdf.lmer, level = "schoolNR")
    3.   ├─base::suppressMessages(...)
    4.   │ └─base::withCallingHandlers(...)
    5.   └─tibble::tibble(groups, eb.resid, ls.resid[, -1], .name_repair = "universal")
    6.     └─tibble:::tibble_quos(xs, .rows, .name_repair)
    7.       └─tibble:::set_repaired_names(output, repair_hint = TRUE, .name_repair = .name_repair)
    8.         ├─rlang::set_names(...)
    9.         └─tibble:::repaired_names(...)
   10.           ├─tibble:::subclass_name_repair_errors(...)
   11.           │ └─base::withCallingHandlers(...)
   12.           └─vctrs::vec_as_names(...)
   13.             └─vctrs (local) `<fn>`()
   14.               └─vctrs:::as_universal_names(names = names, quiet = quiet)
   15.                 └─vctrs:::describe_repair(names, new_names)
   16.                   └─rlang::names_inform_repair(orig_names, names)
   17.                     └─rlang::inform(message = message, class = "rlib_message_name_repair")
   18.                       ├─base::withRestarts(...)
   19.                       │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.                       │   └─base (local) doWithOneRestart(return(expr), restart)
   21.                       └─base::signalCondition(cnd)
   22.                         ├─base::conditionMessage(cond)
   23.                         └─rlang:::conditionMessage.rlang_message(cond)
   24.                           └─rlang::cnd_message(c)
   25.                             └─rlang:::cnd_message_format(cnd, ...)
   26.                               └─rlang (local) cli_format(glue_escape(lines))
   27.                                 └─rlang:::.rlang_cli_format(x, cli::format_message)
   28.                                   └─cli::cli_format(x, .envir = emptyenv())
   29.                                     └─cli:::fmt(...)
   30.                                       └─cli:::cli__fmt(rec, collapse, strip_newline, app)
   31.                                         ├─base::do.call(app[[msg$type]], msg$args)
   32.                                         └─cli (local) `<fn>`(text = `<named list>`, id = "cli-2553110-84", class = NULL)
   33.                                           └─cli:::clii_bullets(app, text, id, class)
   34.                                             └─base::lapply(...)
   35.                                               └─cli (local) FUN(X[[i]], ...)
   36.                                                 └─app$text(text[[i]])
   37.                                                   └─cli:::clii_text(app, text)
   38.                                                     └─app$xtext(text)
   39.                                                       └─cli:::clii__xtext(...)
   40.                                                         └─cli::ansi_strwrap(text, exdent = exdent, width = app$get_width(extra = padding))
   41.                                                           └─base::lapply(pars, ansi_trimws)
   42.                                                             └─cli (local) FUN(X[[i]], ...)
  
  [ FAIL 2 | WARN 0 | SKIP 4 | PASS 359 ]
  Error: Test failures
  Execution halted