Running ‘testthat.R’ [28s/91s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(tabshiftr)
  > 
  > test_check("tabshiftr")
  [ FAIL 2 | WARN 0 | SKIP 3 | PASS 340 ]
  
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  • empty test (3)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-08_groups.R:20'): groups of rows ───────────────────────────────
  <dplyr:::mutate_error/rlang_error/error/condition>
  Error in `mutate(., across(everything(), ~na_if(x = ., y = "")))`: ℹ In argument: `across(everything(), ~na_if(x = ., y = ""))`.
  Caused by error in `across()`:
  ! Can't compute column `ind`.
  Caused by error in `na_if()`:
  ! Can't convert `y` <character> to match type of `x` <double>.
  Backtrace:
       ▆
    1. ├─tabshiftr:::.expect_valid_table(...) at test-08_groups.R:20:2
    2. │ └─testthat::expect_identical(...)
    3. │   └─testthat::quasi_label(enquo(object), label, arg = "object")
    4. │     └─rlang::eval_bare(expr, quo_get_env(quo))
    5. ├─tabshiftr::reorganise(input = input, schema = schema)
    6. │ └─tabshiftr::getData(input = input, schema = schema)
    7. │   └─... %>% mutate(across(everything(), ~ na_if(x = ., y = "")))
    8. ├─dplyr::mutate(., across(everything(), ~na_if(x = ., y = "")))
    9. ├─dplyr:::mutate.data.frame(., across(everything(), ~na_if(x = ., y = "")))
   10. │ └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by)
   11. │   ├─base::withCallingHandlers(...)
   12. │   └─dplyr:::mutate_col(dots[[i]], data, mask, new_columns)
   13. │     ├─base::withCallingHandlers(...)
   14. │     └─mask$eval_all_mutate(quo)
   15. │       └─dplyr (local) eval()
   16. ├─dplyr::na_if(x = ind, y = "")
   17. │ └─vctrs::vec_cast(x = y, to = x, x_arg = "y", to_arg = "x")
   18. ├─vctrs (local) `<fn>`()
   19. │ └─vctrs::vec_default_cast(...)
   20. │   ├─base::withRestarts(...)
   21. │   │ └─base (local) withOneRestart(expr, restarts[[1L]])
   22. │   │   └─base (local) doWithOneRestart(return(expr), restart)
   23. │   └─vctrs::stop_incompatible_cast(...)
   24. │     └─vctrs::stop_incompatible_type(...)
   25. │       └─vctrs:::stop_incompatible(...)
   26. │         └─vctrs:::stop_vctrs(...)
   27. │           └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = vctrs_error_call(call))
   28. │             └─rlang:::signal_abort(cnd, .file)
   29. │               └─base::signalCondition(cnd)
   30. ├─dplyr (local) `<fn>`(`<vctrs_r_>`)
   31. │ └─rlang::abort(msg, call = call("across"), parent = cnd)
   32. │   └─rlang:::signal_abort(cnd, .file)
   33. │     └─base::signalCondition(cnd)
   34. └─dplyr (local) `<fn>`(`<rlng_rrr>`)
   35.   └─rlang::abort(message, class = error_class, parent = parent, call = error_call)
  ── Error ('test-08_groups.R:42'): apply function to summarise merged rows ──────
  <dplyr:::mutate_error/rlang_error/error/condition>
  Error in `mutate(., across(everything(), ~na_if(x = ., y = "")))`: ℹ In argument: `across(everything(), ~na_if(x = ., y = ""))`.
  Caused by error in `across()`:
  ! Can't compute column `ind`.
  Caused by error in `na_if()`:
  ! Can't convert `y` <character> to match type of `x` <double>.
  Backtrace:
       ▆
    1. ├─tabshiftr:::.expect_valid_table(...) at test-08_groups.R:42:2
    2. │ └─testthat::expect_identical(...)
    3. │   └─testthat::quasi_label(enquo(object), label, arg = "object")
    4. │     └─rlang::eval_bare(expr, quo_get_env(quo))
    5. ├─tabshiftr::reorganise(input = input, schema = schema)
    6. │ └─tabshiftr::getData(input = input, schema = schema)
    7. │   └─... %>% mutate(across(everything(), ~ na_if(x = ., y = "")))
    8. ├─dplyr::mutate(., across(everything(), ~na_if(x = ., y = "")))
    9. ├─dplyr:::mutate.data.frame(., across(everything(), ~na_if(x = ., y = "")))
   10. │ └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by)
   11. │   ├─base::withCallingHandlers(...)
   12. │   └─dplyr:::mutate_col(dots[[i]], data, mask, new_columns)
   13. │     ├─base::withCallingHandlers(...)
   14. │     └─mask$eval_all_mutate(quo)
   15. │       └─dplyr (local) eval()
   16. ├─dplyr::na_if(x = ind, y = "")
   17. │ └─vctrs::vec_cast(x = y, to = x, x_arg = "y", to_arg = "x")
   18. ├─vctrs (local) `<fn>`()
   19. │ └─vctrs::vec_default_cast(...)
   20. │   ├─base::withRestarts(...)
   21. │   │ └─base (local) withOneRestart(expr, restarts[[1L]])
   22. │   │   └─base (local) doWithOneRestart(return(expr), restart)
   23. │   └─vctrs::stop_incompatible_cast(...)
   24. │     └─vctrs::stop_incompatible_type(...)
   25. │       └─vctrs:::stop_incompatible(...)
   26. │         └─vctrs:::stop_vctrs(...)
   27. │           └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = vctrs_error_call(call))
   28. │             └─rlang:::signal_abort(cnd, .file)
   29. │               └─base::signalCondition(cnd)
   30. ├─dplyr (local) `<fn>`(`<vctrs_r_>`)
   31. │ └─rlang::abort(msg, call = call("across"), parent = cnd)
   32. │   └─rlang:::signal_abort(cnd, .file)
   33. │     └─base::signalCondition(cnd)
   34. └─dplyr (local) `<fn>`(`<rlng_rrr>`)
   35.   └─rlang::abort(message, class = error_class, parent = parent, call = error_call)
  
  [ FAIL 2 | WARN 0 | SKIP 3 | PASS 340 ]
  Error: Test failures
  Execution halted