Running ‘spelling.R’ [0s/0s]
  Running ‘testthat.R’ [4s/5s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/tests.html
  > # * https://testthat.r-lib.org/reference/test_package.html#special-files
  > 
  > library(testthat)
  > library(stRoke)
  > 
  > test_check("stRoke")
  Waiting for profiling to be done...
  Waiting for profiling to be done...
  Waiting for profiling to be done...
  Waiting for profiling to be done...
  OBS: as per 2007 not all valid CPR numbers apply to modulus 11 rule.
      
  See the vignette 'Toolbox'
  
  > 2 + 2
  [1] 4
  
  > 2 + 2
  [1] 4
  
  > 2 + 2
  [1] 4
  [ FAIL 1 | WARN 2 | SKIP 0 | PASS 109 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-generic_stroke.R:4:3'): generic_stroke() runs! ─────────────────
  <dplyr:::mutate_error/rlang_error/error/condition>
  Error in `dplyr::mutate(.data = .y, stat = as.character(glue::glue(statistic[[.data$variable[1]]], 
      .envir = cards::get_ard_statistics(.x, .column = "stat_fmt"))))`: i In argument: `stat = as.character(...)`.
  Caused by error in `glue_data()`:
  ! is.environment(.envir) is not TRUE
  Backtrace:
       ▆
    1. ├─stRoke::generic_stroke(...) at test-generic_stroke.R:4:3
    2. │ ├─gtsummary::add_overall(...)
    3. │ │ └─gtsummary:::check_class(x, "gtsummary")
    4. │ └─gtsummary::tbl_summary(data = df[, c(group, variables)], by = group)
    5. │   ├─base::structure(...)
    6. │   ├─base::append(...)
    7. │   └─gtsummary::brdg_summary(...)
    8. │     ├─dplyr::left_join(...)
    9. │     ├─dplyr:::left_join.data.frame(...)
   10. │     │ └─dplyr::auto_copy(x, y, copy = copy)
   11. │     │   ├─dplyr::same_src(x, y)
   12. │     │   └─dplyr:::same_src.data.frame(x, y)
   13. │     │     └─base::is.data.frame(y)
   14. │     ├─dplyr::bind_rows(...)
   15. │     │ └─rlang::list2(...)
   16. │     └─gtsummary::pier_summary_continuous(...)
   17. │       ├─... %>% ...
   18. │       ├─dplyr::bind_rows(...)
   19. │       │ └─rlang::list2(...)
   20. │       ├─dplyr::group_map(...)
   21. │       └─dplyr:::group_map.data.frame(...)
   22. │         └─dplyr:::map2(chunks, group_keys, .f, ...)
   23. │           └─base::mapply(.f, .x, .y, MoreArgs = list(...), SIMPLIFY = FALSE)
   24. │             └─gtsummary (local) `<fn>`(dots[[1L]][[1L]], dots[[2L]][[1L]])
   25. │               ├─dplyr::mutate(...)
   26. │               └─dplyr:::mutate.data.frame(...)
   27. │                 └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by)
   28. │                   ├─base::withCallingHandlers(...)
   29. │                   └─dplyr:::mutate_col(dots[[i]], data, mask, new_columns)
   30. │                     └─mask$eval_all_mutate(quo)
   31. │                       └─dplyr (local) eval()
   32. ├─dplyr::left_join(...)
   33. ├─dplyr:::left_join.data.frame(...)
   34. │ └─dplyr::auto_copy(x, y, copy = copy)
   35. │   ├─dplyr::same_src(x, y)
   36. │   └─dplyr:::same_src.data.frame(x, y)
   37. │     └─base::is.data.frame(y)
   38. ├─glue::glue(...)
   39. │ └─glue::glue_data(...)
   40. │   └─base::stopifnot(is.environment(.envir))
   41. │     └─base::stop(simpleError(msg, call = if (p <- sys.parent(1L)) sys.call(p)))
   42. └─dplyr (local) `<fn>`(`<smplErrr>`)
   43.   └─rlang::abort(message, class = error_class, parent = parent, call = error_call)
  
  [ FAIL 1 | WARN 2 | SKIP 0 | PASS 109 ]
  Error: Test failures
  Execution halted