Running ‘testthat.R’ [4s/4s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(docxtools)
  > 
  > test_check("docxtools")
  ── 1. Error: Factors are returned unaffected (@test_format_engr.R#14)  ─────────
  Problem with `mutate()` input `observ_index`.
  ✖ Input `observ_index` can't be recycled to size 0.
  ℹ Input `observ_index` is `1:dplyr::n()`.
  ℹ Input `observ_index` must be size 0 or 1, not 2.
  Backtrace:
    1. docxtools::format_engr(head(CO2, n = 5L))
    2. docxtools:::obs_add(numeric_as_is)
    4. dplyr:::mutate.data.frame(x, observ_index = 1:dplyr::n())
    5. dplyr:::mutate_cols(.data, ...)
    6. base::tryCatch(...)
    7. base:::tryCatchList(expr, classes, parentenv, handlers)
    8. base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
    9. value[[3L]](cond)
   10. dplyr:::stop_mutate_recycle_incompatible_size(e, index = i, dots = dots)
   11. dplyr:::stop_dplyr(...)
  
  ── 2. Error: (unknown) (@test_format_engr.R#55)  ───────────────────────────────
  Problem with `mutate()` input `observ_index`.
  ✖ Input `observ_index` can't be recycled to size 0.
  ℹ Input `observ_index` is `1:dplyr::n()`.
  ℹ Input `observ_index` must be size 0 or 1, not 2.
  Backtrace:
    1. base::do.call(docxtools::format_engr, my_args)
    3. docxtools:::obs_add(numeric_as_is)
    5. dplyr:::mutate.data.frame(x, observ_index = 1:dplyr::n())
    6. dplyr:::mutate_cols(.data, ...)
    7. base::tryCatch(...)
    8. base:::tryCatchList(expr, classes, parentenv, handlers)
    9. base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
   10. value[[3L]](cond)
   11. dplyr:::stop_mutate_recycle_incompatible_size(e, index = i, dots = dots)
   12. dplyr:::stop_dplyr(...)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 19 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 2 ]
  1. Error: Factors are returned unaffected (@test_format_engr.R#14) 
  2. Error: (unknown) (@test_format_engr.R#55) 
  
  Error: testthat unit tests failed
  Execution halted