Running 'testthat.R' [78s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(srvyr)
  
  Attaching package: 'srvyr'
  
  The following object is masked from 'package:stats':
  
      filter
  
  > 
  > test_check("srvyr")
  [ FAIL 18 | WARN 0 | SKIP 0 | PASS 379 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (test_as_survey_twophase.r:20:1): (code run outside of `test_that()`) ──
  Error in `dplyr::bind_cols(.)`: number of characters is not computable in "bytes" encoding, element 1
  Backtrace:
       ▆
    1. ├─... %>% tibble::as_tibble() at test_as_survey_twophase.r:20:0
    2. ├─tibble::as_tibble(.)
    3. ├─stats::setNames(...)
    4. ├─dplyr::bind_cols(.)
    5. │ ├─dplyr:::fix_call(vec_cbind(!!!dots, .name_repair = .name_repair))
    6. │ │ └─base::withCallingHandlers(...)
    7. │ └─vctrs::vec_cbind(!!!dots, .name_repair = .name_repair)
    8. ├─vctrs:::describe_repair(`<chr>`, `<chr>`)
    9. │ └─rlang::names_inform_repair(orig_names, names)
   10. │   └─rlang::inform(message = message, class = "rlib_message_name_repair")
   11. │     ├─base::withRestarts(...)
   12. │     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   13. │     │   └─base (local) doWithOneRestart(return(expr), restart)
   14. │     └─base::signalCondition(cnd)
   15. │       ├─base::conditionMessage(cond)
   16. │       └─rlang:::conditionMessage.rlang_message(cond)
   17. │         └─rlang::cnd_message(c)
   18. │           └─rlang:::cnd_message_format(cnd, ...)
   19. │             └─rlang (local) cli_format(glue_escape(lines))
   20. │               └─rlang:::.rlang_cli_format(x, cli::format_message)
   21. │                 └─cli::cli_format(x, .envir = emptyenv())
   22. │                   └─cli:::fmt(...)
   23. │                     └─cli:::cli__fmt(rec, collapse, strip_newline, app)
   24. │                       ├─base::do.call(app[[msg$type]], msg$args)
   25. │                       └─cli (local) `<fn>`(text = `<named list>`, id = "cli-24140-42", class = NULL)
   26. │                         └─cli:::clii_bullets(app, text, id, class)
   27. │                           └─base::lapply(...)
   28. │                             └─cli (local) FUN(X[[i]], ...)
   29. │                               └─app$text(text[[i]])
   30. │                                 └─cli:::clii_text(app, text)
   31. │                                   └─app$xtext(text)
   32. │                                     └─cli:::clii__xtext(...)
   33. │                                       └─cli::ansi_strwrap(text, exdent = exdent, width = app$get_width(extra = padding))
   34. │                                         └─base::lapply(pars, ansi_trimws)
   35. │                                           └─cli (local) FUN(X[[i]], ...)
   36. └─base::.handleSimpleError(...)
   37.   └─dplyr (local) h(simpleError(msg, call))
   38.     └─rlang::cnd_signal(cnd)
  ── Failure (test_survey_statistics.r:456:5): survey_var doesn't works for grouped surveys if there are groups with less than 2 observations ──
  `{ ... }` threw an error with unexpected message.
  Expected match: "Population variance can't be computed because some groups contain less than 2 observations"
  Actual message: "number of characters is not computable in \"bytes\" encoding, element 1"
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test_survey_statistics.r:456:4
    2. │ └─testthat:::quasi_capture(...)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ └─base::withCallingHandlers(...)
    5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    6. ├─dstrata %>% group_by(dname) %>% ... at test_survey_statistics.r:458:8
    7. ├─dplyr::summarise(., api99 = survey_var(api99))
    8. ├─srvyr:::summarise.grouped_svy(., api99 = survey_var(api99))
    9. │ ├─dplyr::summarise(.data$variables, !!!.dots, .groups = .groups)
   10. │ └─dplyr:::summarise.grouped_df(.data$variables, !!!.dots, .groups = .groups)
   11. │   └─dplyr:::summarise_cols(.data, dplyr_quosures(...), caller_env = caller_env())
   12. │     ├─base::withCallingHandlers(...)
   13. │     └─dplyr:::map(quosures, summarise_eval_one, mask = mask)
   14. │       └─base::lapply(.x, .f, ...)
   15. │         └─dplyr (local) FUN(X[[i]], ...)
   16. │           └─mask$eval_all_summarise(quo)
   17. ├─srvyr::survey_var(api99)
   18. │ └─base::stop("Population variance can't be computed because some groups contain less than 2 observations.")
   19. └─base::.handleSimpleError(...)
   20.   └─dplyr (local) h(simpleError(msg, call))
   21.     └─rlang::abort(bullets, call = error_call, parent = skip_internal_condition(e))
   22.       └─rlang:::signal_abort(cnd, .file)
   23.         └─base::signalCondition(cnd)
   24.           ├─base::conditionMessage(cond)
   25.           └─rlang:::conditionMessage.rlang_error(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_error)
   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-24140-105", 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]], ...)
  ── Failure (test_survey_statistics.r:538:13): survey_STATISTIC functions fail with x being a factor ──
  `summarise(dstrataGrp, survey_mean(stype))` threw an error with unexpected message.
  Expected match: "Factor not allowed in survey functions, should be used as a grouping variable."
  Actual message: "number of characters is not computable in \"bytes\" encoding, element 1"
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test_survey_statistics.r:538: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. ├─dplyr::summarise(dstrataGrp, survey_mean(stype))
    7. ├─srvyr:::summarise.grouped_svy(dstrataGrp, survey_mean(stype))
    8. │ ├─dplyr::summarise(.data$variables, !!!.dots, .groups = .groups)
    9. │ └─dplyr:::summarise.grouped_df(.data$variables, !!!.dots, .groups = .groups)
   10. │   └─dplyr:::summarise_cols(.data, dplyr_quosures(...), caller_env = caller_env())
   11. │     ├─base::withCallingHandlers(...)
   12. │     └─dplyr:::map(quosures, summarise_eval_one, mask = mask)
   13. │       └─base::lapply(.x, .f, ...)
   14. │         └─dplyr (local) FUN(X[[i]], ...)
   15. │           └─mask$eval_all_summarise(quo)
   16. ├─srvyr::survey_mean(stype)
   17. │ └─srvyr:::stop_for_factor(x)
   18. │   └─base::stop(...)
   19. └─base::.handleSimpleError(...)
   20.   └─dplyr (local) h(simpleError(msg, call))
   21.     └─rlang::abort(bullets, call = error_call, parent = skip_internal_condition(e))
   22.       └─rlang:::signal_abort(cnd, .file)
   23.         └─base::signalCondition(cnd)
   24.           ├─base::conditionMessage(cond)
   25.           └─rlang:::conditionMessage.rlang_error(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_error)
   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-24140-455", 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]], ...)
  ── Failure (test_survey_statistics.r:540:13): survey_STATISTIC functions fail with x being a factor ──
  `summarise(dstrataGrp, survey_total(stype))` threw an error with unexpected message.
  Expected match: "Factor not allowed in survey functions, should be used as a grouping variable."
  Actual message: "number of characters is not computable in \"bytes\" encoding, element 1"
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test_survey_statistics.r:540: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. ├─dplyr::summarise(dstrataGrp, survey_total(stype))
    7. ├─srvyr:::summarise.grouped_svy(dstrataGrp, survey_total(stype))
    8. │ ├─dplyr::summarise(.data$variables, !!!.dots, .groups = .groups)
    9. │ └─dplyr:::summarise.grouped_df(.data$variables, !!!.dots, .groups = .groups)
   10. │   └─dplyr:::summarise_cols(.data, dplyr_quosures(...), caller_env = caller_env())
   11. │     ├─base::withCallingHandlers(...)
   12. │     └─dplyr:::map(quosures, summarise_eval_one, mask = mask)
   13. │       └─base::lapply(.x, .f, ...)
   14. │         └─dplyr (local) FUN(X[[i]], ...)
   15. │           └─mask$eval_all_summarise(quo)
   16. ├─srvyr::survey_total(stype)
   17. │ └─srvyr:::stop_for_factor(x)
   18. │   └─base::stop(...)
   19. └─base::.handleSimpleError(...)
   20.   └─dplyr (local) h(simpleError(msg, call))
   21.     └─rlang::abort(bullets, call = error_call, parent = skip_internal_condition(e))
   22.       └─rlang:::signal_abort(cnd, .file)
   23.         └─base::signalCondition(cnd)
   24.           ├─base::conditionMessage(cond)
   25.           └─rlang:::conditionMessage.rlang_error(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_error)
   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-24140-461", 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]], ...)
  ── Failure (test_survey_statistics.r:542:13): survey_STATISTIC functions fail with x being a factor ──
  `summarise(dstrataGrp, survey_ratio(stype, api99))` threw an error with unexpected message.
  Expected match: "Factor not allowed in survey functions, should be used as a grouping variable."
  Actual message: "number of characters is not computable in \"bytes\" encoding, element 1"
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test_survey_statistics.r:542: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. ├─dplyr::summarise(dstrataGrp, survey_ratio(stype, api99))
    7. ├─srvyr:::summarise.grouped_svy(...)
    8. │ ├─dplyr::summarise(.data$variables, !!!.dots, .groups = .groups)
    9. │ └─dplyr:::summarise.grouped_df(.data$variables, !!!.dots, .groups = .groups)
   10. │   └─dplyr:::summarise_cols(.data, dplyr_quosures(...), caller_env = caller_env())
   11. │     ├─base::withCallingHandlers(...)
   12. │     └─dplyr:::map(quosures, summarise_eval_one, mask = mask)
   13. │       └─base::lapply(.x, .f, ...)
   14. │         └─dplyr (local) FUN(X[[i]], ...)
   15. │           └─mask$eval_all_summarise(quo)
   16. ├─srvyr::survey_ratio(stype, api99)
   17. │ └─srvyr:::stop_for_factor(numerator)
   18. │   └─base::stop(...)
   19. └─base::.handleSimpleError(...)
   20.   └─dplyr (local) h(simpleError(msg, call))
   21.     └─rlang::abort(bullets, call = error_call, parent = skip_internal_condition(e))
   22.       └─rlang:::signal_abort(cnd, .file)
   23.         └─base::signalCondition(cnd)
   24.           ├─base::conditionMessage(cond)
   25.           └─rlang:::conditionMessage.rlang_error(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_error)
   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-24140-467", 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]], ...)
  ── Failure (test_survey_statistics.r:544:13): survey_STATISTIC functions fail with x being a factor ──
  `summarise(dstrataGrp, survey_ratio(api99, stype))` threw an error with unexpected message.
  Expected match: "Factor not allowed in survey functions, should be used as a grouping variable."
  Actual message: "number of characters is not computable in \"bytes\" encoding, element 1"
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test_survey_statistics.r:544: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. ├─dplyr::summarise(dstrataGrp, survey_ratio(api99, stype))
    7. ├─srvyr:::summarise.grouped_svy(...)
    8. │ ├─dplyr::summarise(.data$variables, !!!.dots, .groups = .groups)
    9. │ └─dplyr:::summarise.grouped_df(.data$variables, !!!.dots, .groups = .groups)
   10. │   └─dplyr:::summarise_cols(.data, dplyr_quosures(...), caller_env = caller_env())
   11. │     ├─base::withCallingHandlers(...)
   12. │     └─dplyr:::map(quosures, summarise_eval_one, mask = mask)
   13. │       └─base::lapply(.x, .f, ...)
   14. │         └─dplyr (local) FUN(X[[i]], ...)
   15. │           └─mask$eval_all_summarise(quo)
   16. ├─srvyr::survey_ratio(api99, stype)
   17. │ └─srvyr:::stop_for_factor(denominator)
   18. │   └─base::stop(...)
   19. └─base::.handleSimpleError(...)
   20.   └─dplyr (local) h(simpleError(msg, call))
   21.     └─rlang::abort(bullets, call = error_call, parent = skip_internal_condition(e))
   22.       └─rlang:::signal_abort(cnd, .file)
   23.         └─base::signalCondition(cnd)
   24.           ├─base::conditionMessage(cond)
   25.           └─rlang:::conditionMessage.rlang_error(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_error)
   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-24140-473", 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]], ...)
  ── Failure (test_survey_statistics.r:546:13): survey_STATISTIC functions fail with x being a factor ──
  `summarise(dstrataGrp, survey_quantile(stype))` threw an error with unexpected message.
  Expected match: "Factor not allowed in survey functions, should be used as a grouping variable."
  Actual message: "number of characters is not computable in \"bytes\" encoding, element 1"
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test_survey_statistics.r:546: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. ├─dplyr::summarise(dstrataGrp, survey_quantile(stype))
    7. ├─srvyr:::summarise.grouped_svy(dstrataGrp, survey_quantile(stype))
    8. │ ├─dplyr::summarise(.data$variables, !!!.dots, .groups = .groups)
    9. │ └─dplyr:::summarise.grouped_df(.data$variables, !!!.dots, .groups = .groups)
   10. │   └─dplyr:::summarise_cols(.data, dplyr_quosures(...), caller_env = caller_env())
   11. │     ├─base::withCallingHandlers(...)
   12. │     └─dplyr:::map(quosures, summarise_eval_one, mask = mask)
   13. │       └─base::lapply(.x, .f, ...)
   14. │         └─dplyr (local) FUN(X[[i]], ...)
   15. │           └─mask$eval_all_summarise(quo)
   16. ├─srvyr::survey_quantile(stype)
   17. │ └─srvyr:::stop_for_factor(x)
   18. │   └─base::stop(...)
   19. └─base::.handleSimpleError(...)
   20.   └─dplyr (local) h(simpleError(msg, call))
   21.     └─rlang::abort(bullets, call = error_call, parent = skip_internal_condition(e))
   22.       └─rlang:::signal_abort(cnd, .file)
   23.         └─base::signalCondition(cnd)
   24.           ├─base::conditionMessage(cond)
   25.           └─rlang:::conditionMessage.rlang_error(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_error)
   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-24140-479", 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]], ...)
  ── Failure (test_survey_statistics.r:548:13): survey_STATISTIC functions fail with x being a factor ──
  `summarise(dstrataGrp, survey_median(stype))` threw an error with unexpected message.
  Expected match: "Factor not allowed in survey functions, should be used as a grouping variable."
  Actual message: "number of characters is not computable in \"bytes\" encoding, element 1"
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test_survey_statistics.r:548: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. ├─dplyr::summarise(dstrataGrp, survey_median(stype))
    7. ├─srvyr:::summarise.grouped_svy(dstrataGrp, survey_median(stype))
    8. │ ├─dplyr::summarise(.data$variables, !!!.dots, .groups = .groups)
    9. │ └─dplyr:::summarise.grouped_df(.data$variables, !!!.dots, .groups = .groups)
   10. │   └─dplyr:::summarise_cols(.data, dplyr_quosures(...), caller_env = caller_env())
   11. │     ├─base::withCallingHandlers(...)
   12. │     └─dplyr:::map(quosures, summarise_eval_one, mask = mask)
   13. │       └─base::lapply(.x, .f, ...)
   14. │         └─dplyr (local) FUN(X[[i]], ...)
   15. │           └─mask$eval_all_summarise(quo)
   16. ├─srvyr::survey_median(stype)
   17. │ └─srvyr::survey_quantile(...)
   18. │   └─srvyr:::stop_for_factor(x)
   19. │     └─base::stop(...)
   20. └─base::.handleSimpleError(...)
   21.   └─dplyr (local) h(simpleError(msg, call))
   22.     └─rlang::abort(bullets, call = error_call, parent = skip_internal_condition(e))
   23.       └─rlang:::signal_abort(cnd, .file)
   24.         └─base::signalCondition(cnd)
   25.           ├─base::conditionMessage(cond)
   26.           └─rlang:::conditionMessage.rlang_error(cond)
   27.             └─rlang::cnd_message(c)
   28.               └─rlang:::cnd_message_format(cnd, ...)
   29.                 └─rlang (local) cli_format(glue_escape(lines))
   30.                   └─rlang:::.rlang_cli_format(x, cli::format_error)
   31.                     └─cli::cli_format(x, .envir = emptyenv())
   32.                       └─cli:::fmt(...)
   33.                         └─cli:::cli__fmt(rec, collapse, strip_newline, app)
   34.                           ├─base::do.call(app[[msg$type]], msg$args)
   35.                           └─cli (local) `<fn>`(text = `<named list>`, id = "cli-24140-485", class = NULL)
   36.                             └─cli:::clii_bullets(app, text, id, class)
   37.                               └─base::lapply(...)
   38.                                 └─cli (local) FUN(X[[i]], ...)
   39.                                   └─app$text(text[[i]])
   40.                                     └─cli:::clii_text(app, text)
   41.                                       └─app$xtext(text)
   42.                                         └─cli:::clii__xtext(...)
   43.                                           └─cli::ansi_strwrap(text, exdent = exdent, width = app$get_width(extra = padding))
   44.                                             └─base::lapply(pars, ansi_trimws)
   45.                                               └─cli (local) FUN(X[[i]], ...)
  ── Failure (test_survey_statistics.r:550:13): survey_STATISTIC functions fail with x being a factor ──
  `summarise(dstrataGrp, survey_var(stype))` threw an error with unexpected message.
  Expected match: "Factor not allowed in survey functions, should be used as a grouping variable."
  Actual message: "number of characters is not computable in \"bytes\" encoding, element 1"
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test_survey_statistics.r:550: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. ├─dplyr::summarise(dstrataGrp, survey_var(stype))
    7. ├─srvyr:::summarise.grouped_svy(dstrataGrp, survey_var(stype))
    8. │ ├─dplyr::summarise(.data$variables, !!!.dots, .groups = .groups)
    9. │ └─dplyr:::summarise.grouped_df(.data$variables, !!!.dots, .groups = .groups)
   10. │   └─dplyr:::summarise_cols(.data, dplyr_quosures(...), caller_env = caller_env())
   11. │     ├─base::withCallingHandlers(...)
   12. │     └─dplyr:::map(quosures, summarise_eval_one, mask = mask)
   13. │       └─base::lapply(.x, .f, ...)
   14. │         └─dplyr (local) FUN(X[[i]], ...)
   15. │           └─mask$eval_all_summarise(quo)
   16. ├─srvyr::survey_var(stype)
   17. │ └─srvyr:::stop_for_factor(x)
   18. │   └─base::stop(...)
   19. └─base::.handleSimpleError(...)
   20.   └─dplyr (local) h(simpleError(msg, call))
   21.     └─rlang::abort(bullets, call = error_call, parent = skip_internal_condition(e))
   22.       └─rlang:::signal_abort(cnd, .file)
   23.         └─base::signalCondition(cnd)
   24.           ├─base::conditionMessage(cond)
   25.           └─rlang:::conditionMessage.rlang_error(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_error)
   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-24140-491", 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]], ...)
  ── Failure (test_survey_statistics.r:552:13): survey_STATISTIC functions fail with x being a factor ──
  `summarise(dstrataGrp, survey_sd(stype))` threw an error with unexpected message.
  Expected match: "Factor not allowed in survey functions, should be used as a grouping variable."
  Actual message: "number of characters is not computable in \"bytes\" encoding, element 1"
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test_survey_statistics.r:552: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. ├─dplyr::summarise(dstrataGrp, survey_sd(stype))
    7. ├─srvyr:::summarise.grouped_svy(dstrataGrp, survey_sd(stype))
    8. │ ├─dplyr::summarise(.data$variables, !!!.dots, .groups = .groups)
    9. │ └─dplyr:::summarise.grouped_df(.data$variables, !!!.dots, .groups = .groups)
   10. │   └─dplyr:::summarise_cols(.data, dplyr_quosures(...), caller_env = caller_env())
   11. │     ├─base::withCallingHandlers(...)
   12. │     └─dplyr:::map(quosures, summarise_eval_one, mask = mask)
   13. │       └─base::lapply(.x, .f, ...)
   14. │         └─dplyr (local) FUN(X[[i]], ...)
   15. │           └─mask$eval_all_summarise(quo)
   16. ├─srvyr::survey_sd(stype)
   17. │ └─srvyr::survey_var(x, na.rm = na.rm, vartype = NULL)
   18. │   └─srvyr:::stop_for_factor(x)
   19. │     └─base::stop(...)
   20. └─base::.handleSimpleError(...)
   21.   └─dplyr (local) h(simpleError(msg, call))
   22.     └─rlang::abort(bullets, call = error_call, parent = skip_internal_condition(e))
   23.       └─rlang:::signal_abort(cnd, .file)
   24.         └─base::signalCondition(cnd)
   25.           ├─base::conditionMessage(cond)
   26.           └─rlang:::conditionMessage.rlang_error(cond)
   27.             └─rlang::cnd_message(c)
   28.               └─rlang:::cnd_message_format(cnd, ...)
   29.                 └─rlang (local) cli_format(glue_escape(lines))
   30.                   └─rlang:::.rlang_cli_format(x, cli::format_error)
   31.                     └─cli::cli_format(x, .envir = emptyenv())
   32.                       └─cli:::fmt(...)
   33.                         └─cli:::cli__fmt(rec, collapse, strip_newline, app)
   34.                           ├─base::do.call(app[[msg$type]], msg$args)
   35.                           └─cli (local) `<fn>`(text = `<named list>`, id = "cli-24140-497", class = NULL)
   36.                             └─cli:::clii_bullets(app, text, id, class)
   37.                               └─base::lapply(...)
   38.                                 └─cli (local) FUN(X[[i]], ...)
   39.                                   └─app$text(text[[i]])
   40.                                     └─cli:::clii_text(app, text)
   41.                                       └─app$xtext(text)
   42.                                         └─cli:::clii__xtext(...)
   43.                                           └─cli::ansi_strwrap(text, exdent = exdent, width = app$get_width(extra = padding))
   44.                                             └─base::lapply(pars, ansi_trimws)
   45.                                               └─cli (local) FUN(X[[i]], ...)
  ── Failure (test_survey_statistics.r:577:13): survey_STATISTIC functions fail with x being a character ──
  `summarise(dstrataGrp, survey_mean(name))` threw an error with unexpected message.
  Expected match: "Character vectors not allowed in survey functions, should be used as a grouping variable."
  Actual message: "number of characters is not computable in \"bytes\" encoding, element 1"
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test_survey_statistics.r:577: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. ├─dplyr::summarise(dstrataGrp, survey_mean(name))
    7. ├─srvyr:::summarise.grouped_svy(dstrataGrp, survey_mean(name))
    8. │ ├─dplyr::summarise(.data$variables, !!!.dots, .groups = .groups)
    9. │ └─dplyr:::summarise.grouped_df(.data$variables, !!!.dots, .groups = .groups)
   10. │   └─dplyr:::summarise_cols(.data, dplyr_quosures(...), caller_env = caller_env())
   11. │     ├─base::withCallingHandlers(...)
   12. │     └─dplyr:::map(quosures, summarise_eval_one, mask = mask)
   13. │       └─base::lapply(.x, .f, ...)
   14. │         └─dplyr (local) FUN(X[[i]], ...)
   15. │           └─mask$eval_all_summarise(quo)
   16. ├─srvyr::survey_mean(name)
   17. │ └─srvyr:::stop_for_factor(x)
   18. │   └─base::stop(...)
   19. └─base::.handleSimpleError(...)
   20.   └─dplyr (local) h(simpleError(msg, call))
   21.     └─rlang::abort(bullets, call = error_call, parent = skip_internal_condition(e))
   22.       └─rlang:::signal_abort(cnd, .file)
   23.         └─base::signalCondition(cnd)
   24.           ├─base::conditionMessage(cond)
   25.           └─rlang:::conditionMessage.rlang_error(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_error)
   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-24140-583", 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]], ...)
  ── Failure (test_survey_statistics.r:579:13): survey_STATISTIC functions fail with x being a character ──
  `summarise(dstrataGrp, survey_total(name))` threw an error with unexpected message.
  Expected match: "Character vectors not allowed in survey functions, should be used as a grouping variable."
  Actual message: "number of characters is not computable in \"bytes\" encoding, element 1"
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test_survey_statistics.r:579: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. ├─dplyr::summarise(dstrataGrp, survey_total(name))
    7. ├─srvyr:::summarise.grouped_svy(dstrataGrp, survey_total(name))
    8. │ ├─dplyr::summarise(.data$variables, !!!.dots, .groups = .groups)
    9. │ └─dplyr:::summarise.grouped_df(.data$variables, !!!.dots, .groups = .groups)
   10. │   └─dplyr:::summarise_cols(.data, dplyr_quosures(...), caller_env = caller_env())
   11. │     ├─base::withCallingHandlers(...)
   12. │     └─dplyr:::map(quosures, summarise_eval_one, mask = mask)
   13. │       └─base::lapply(.x, .f, ...)
   14. │         └─dplyr (local) FUN(X[[i]], ...)
   15. │           └─mask$eval_all_summarise(quo)
   16. ├─srvyr::survey_total(name)
   17. │ └─srvyr:::stop_for_factor(x)
   18. │   └─base::stop(...)
   19. └─base::.handleSimpleError(...)
   20.   └─dplyr (local) h(simpleError(msg, call))
   21.     └─rlang::abort(bullets, call = error_call, parent = skip_internal_condition(e))
   22.       └─rlang:::signal_abort(cnd, .file)
   23.         └─base::signalCondition(cnd)
   24.           ├─base::conditionMessage(cond)
   25.           └─rlang:::conditionMessage.rlang_error(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_error)
   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-24140-589", 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]], ...)
  ── Failure (test_survey_statistics.r:581:13): survey_STATISTIC functions fail with x being a character ──
  `summarise(dstrataGrp, survey_ratio(name, api99))` threw an error with unexpected message.
  Expected match: "Character vectors not allowed in survey functions, should be used as a grouping variable."
  Actual message: "number of characters is not computable in \"bytes\" encoding, element 1"
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test_survey_statistics.r:581: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. ├─dplyr::summarise(dstrataGrp, survey_ratio(name, api99))
    7. ├─srvyr:::summarise.grouped_svy(...)
    8. │ ├─dplyr::summarise(.data$variables, !!!.dots, .groups = .groups)
    9. │ └─dplyr:::summarise.grouped_df(.data$variables, !!!.dots, .groups = .groups)
   10. │   └─dplyr:::summarise_cols(.data, dplyr_quosures(...), caller_env = caller_env())
   11. │     ├─base::withCallingHandlers(...)
   12. │     └─dplyr:::map(quosures, summarise_eval_one, mask = mask)
   13. │       └─base::lapply(.x, .f, ...)
   14. │         └─dplyr (local) FUN(X[[i]], ...)
   15. │           └─mask$eval_all_summarise(quo)
   16. ├─srvyr::survey_ratio(name, api99)
   17. │ └─srvyr:::stop_for_factor(numerator)
   18. │   └─base::stop(...)
   19. └─base::.handleSimpleError(...)
   20.   └─dplyr (local) h(simpleError(msg, call))
   21.     └─rlang::abort(bullets, call = error_call, parent = skip_internal_condition(e))
   22.       └─rlang:::signal_abort(cnd, .file)
   23.         └─base::signalCondition(cnd)
   24.           ├─base::conditionMessage(cond)
   25.           └─rlang:::conditionMessage.rlang_error(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_error)
   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-24140-595", 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]], ...)
  ── Failure (test_survey_statistics.r:583:13): survey_STATISTIC functions fail with x being a character ──
  `summarise(dstrataGrp, survey_ratio(api99, name))` threw an error with unexpected message.
  Expected match: "Character vectors not allowed in survey functions, should be used as a grouping variable."
  Actual message: "number of characters is not computable in \"bytes\" encoding, element 1"
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test_survey_statistics.r:583: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. ├─dplyr::summarise(dstrataGrp, survey_ratio(api99, name))
    7. ├─srvyr:::summarise.grouped_svy(...)
    8. │ ├─dplyr::summarise(.data$variables, !!!.dots, .groups = .groups)
    9. │ └─dplyr:::summarise.grouped_df(.data$variables, !!!.dots, .groups = .groups)
   10. │   └─dplyr:::summarise_cols(.data, dplyr_quosures(...), caller_env = caller_env())
   11. │     ├─base::withCallingHandlers(...)
   12. │     └─dplyr:::map(quosures, summarise_eval_one, mask = mask)
   13. │       └─base::lapply(.x, .f, ...)
   14. │         └─dplyr (local) FUN(X[[i]], ...)
   15. │           └─mask$eval_all_summarise(quo)
   16. ├─srvyr::survey_ratio(api99, name)
   17. │ └─srvyr:::stop_for_factor(denominator)
   18. │   └─base::stop(...)
   19. └─base::.handleSimpleError(...)
   20.   └─dplyr (local) h(simpleError(msg, call))
   21.     └─rlang::abort(bullets, call = error_call, parent = skip_internal_condition(e))
   22.       └─rlang:::signal_abort(cnd, .file)
   23.         └─base::signalCondition(cnd)
   24.           ├─base::conditionMessage(cond)
   25.           └─rlang:::conditionMessage.rlang_error(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_error)
   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-24140-601", 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]], ...)
  ── Failure (test_survey_statistics.r:585:13): survey_STATISTIC functions fail with x being a character ──
  `summarise(dstrataGrp, survey_quantile(name))` threw an error with unexpected message.
  Expected match: "Character vectors not allowed in survey functions, should be used as a grouping variable."
  Actual message: "number of characters is not computable in \"bytes\" encoding, element 1"
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test_survey_statistics.r:585: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. ├─dplyr::summarise(dstrataGrp, survey_quantile(name))
    7. ├─srvyr:::summarise.grouped_svy(dstrataGrp, survey_quantile(name))
    8. │ ├─dplyr::summarise(.data$variables, !!!.dots, .groups = .groups)
    9. │ └─dplyr:::summarise.grouped_df(.data$variables, !!!.dots, .groups = .groups)
   10. │   └─dplyr:::summarise_cols(.data, dplyr_quosures(...), caller_env = caller_env())
   11. │     ├─base::withCallingHandlers(...)
   12. │     └─dplyr:::map(quosures, summarise_eval_one, mask = mask)
   13. │       └─base::lapply(.x, .f, ...)
   14. │         └─dplyr (local) FUN(X[[i]], ...)
   15. │           └─mask$eval_all_summarise(quo)
   16. ├─srvyr::survey_quantile(name)
   17. │ └─srvyr:::stop_for_factor(x)
   18. │   └─base::stop(...)
   19. └─base::.handleSimpleError(...)
   20.   └─dplyr (local) h(simpleError(msg, call))
   21.     └─rlang::abort(bullets, call = error_call, parent = skip_internal_condition(e))
   22.       └─rlang:::signal_abort(cnd, .file)
   23.         └─base::signalCondition(cnd)
   24.           ├─base::conditionMessage(cond)
   25.           └─rlang:::conditionMessage.rlang_error(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_error)
   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-24140-607", 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]], ...)
  ── Failure (test_survey_statistics.r:587:13): survey_STATISTIC functions fail with x being a character ──
  `summarise(dstrataGrp, survey_median(name))` threw an error with unexpected message.
  Expected match: "Character vectors not allowed in survey functions, should be used as a grouping variable."
  Actual message: "number of characters is not computable in \"bytes\" encoding, element 1"
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test_survey_statistics.r:587: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. ├─dplyr::summarise(dstrataGrp, survey_median(name))
    7. ├─srvyr:::summarise.grouped_svy(dstrataGrp, survey_median(name))
    8. │ ├─dplyr::summarise(.data$variables, !!!.dots, .groups = .groups)
    9. │ └─dplyr:::summarise.grouped_df(.data$variables, !!!.dots, .groups = .groups)
   10. │   └─dplyr:::summarise_cols(.data, dplyr_quosures(...), caller_env = caller_env())
   11. │     ├─base::withCallingHandlers(...)
   12. │     └─dplyr:::map(quosures, summarise_eval_one, mask = mask)
   13. │       └─base::lapply(.x, .f, ...)
   14. │         └─dplyr (local) FUN(X[[i]], ...)
   15. │           └─mask$eval_all_summarise(quo)
   16. ├─srvyr::survey_median(name)
   17. │ └─srvyr::survey_quantile(...)
   18. │   └─srvyr:::stop_for_factor(x)
   19. │     └─base::stop(...)
   20. └─base::.handleSimpleError(...)
   21.   └─dplyr (local) h(simpleError(msg, call))
   22.     └─rlang::abort(bullets, call = error_call, parent = skip_internal_condition(e))
   23.       └─rlang:::signal_abort(cnd, .file)
   24.         └─base::signalCondition(cnd)
   25.           ├─base::conditionMessage(cond)
   26.           └─rlang:::conditionMessage.rlang_error(cond)
   27.             └─rlang::cnd_message(c)
   28.               └─rlang:::cnd_message_format(cnd, ...)
   29.                 └─rlang (local) cli_format(glue_escape(lines))
   30.                   └─rlang:::.rlang_cli_format(x, cli::format_error)
   31.                     └─cli::cli_format(x, .envir = emptyenv())
   32.                       └─cli:::fmt(...)
   33.                         └─cli:::cli__fmt(rec, collapse, strip_newline, app)
   34.                           ├─base::do.call(app[[msg$type]], msg$args)
   35.                           └─cli (local) `<fn>`(text = `<named list>`, id = "cli-24140-613", class = NULL)
   36.                             └─cli:::clii_bullets(app, text, id, class)
   37.                               └─base::lapply(...)
   38.                                 └─cli (local) FUN(X[[i]], ...)
   39.                                   └─app$text(text[[i]])
   40.                                     └─cli:::clii_text(app, text)
   41.                                       └─app$xtext(text)
   42.                                         └─cli:::clii__xtext(...)
   43.                                           └─cli::ansi_strwrap(text, exdent = exdent, width = app$get_width(extra = padding))
   44.                                             └─base::lapply(pars, ansi_trimws)
   45.                                               └─cli (local) FUN(X[[i]], ...)
  ── Failure (test_survey_statistics.r:589:13): survey_STATISTIC functions fail with x being a character ──
  `summarise(dstrataGrp, survey_var(name))` threw an error with unexpected message.
  Expected match: "Character vectors not allowed in survey functions, should be used as a grouping variable."
  Actual message: "number of characters is not computable in \"bytes\" encoding, element 1"
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test_survey_statistics.r:589: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. ├─dplyr::summarise(dstrataGrp, survey_var(name))
    7. ├─srvyr:::summarise.grouped_svy(dstrataGrp, survey_var(name))
    8. │ ├─dplyr::summarise(.data$variables, !!!.dots, .groups = .groups)
    9. │ └─dplyr:::summarise.grouped_df(.data$variables, !!!.dots, .groups = .groups)
   10. │   └─dplyr:::summarise_cols(.data, dplyr_quosures(...), caller_env = caller_env())
   11. │     ├─base::withCallingHandlers(...)
   12. │     └─dplyr:::map(quosures, summarise_eval_one, mask = mask)
   13. │       └─base::lapply(.x, .f, ...)
   14. │         └─dplyr (local) FUN(X[[i]], ...)
   15. │           └─mask$eval_all_summarise(quo)
   16. ├─srvyr::survey_var(name)
   17. │ └─srvyr:::stop_for_factor(x)
   18. │   └─base::stop(...)
   19. └─base::.handleSimpleError(...)
   20.   └─dplyr (local) h(simpleError(msg, call))
   21.     └─rlang::abort(bullets, call = error_call, parent = skip_internal_condition(e))
   22.       └─rlang:::signal_abort(cnd, .file)
   23.         └─base::signalCondition(cnd)
   24.           ├─base::conditionMessage(cond)
   25.           └─rlang:::conditionMessage.rlang_error(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_error)
   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-24140-619", 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]], ...)
  ── Failure (test_survey_statistics.r:591:13): survey_STATISTIC functions fail with x being a character ──
  `summarise(dstrataGrp, survey_sd(name))` threw an error with unexpected message.
  Expected match: "Character vectors not allowed in survey functions, should be used as a grouping variable."
  Actual message: "number of characters is not computable in \"bytes\" encoding, element 1"
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test_survey_statistics.r:591: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. ├─dplyr::summarise(dstrataGrp, survey_sd(name))
    7. ├─srvyr:::summarise.grouped_svy(dstrataGrp, survey_sd(name))
    8. │ ├─dplyr::summarise(.data$variables, !!!.dots, .groups = .groups)
    9. │ └─dplyr:::summarise.grouped_df(.data$variables, !!!.dots, .groups = .groups)
   10. │   └─dplyr:::summarise_cols(.data, dplyr_quosures(...), caller_env = caller_env())
   11. │     ├─base::withCallingHandlers(...)
   12. │     └─dplyr:::map(quosures, summarise_eval_one, mask = mask)
   13. │       └─base::lapply(.x, .f, ...)
   14. │         └─dplyr (local) FUN(X[[i]], ...)
   15. │           └─mask$eval_all_summarise(quo)
   16. ├─srvyr::survey_sd(name)
   17. │ └─srvyr::survey_var(x, na.rm = na.rm, vartype = NULL)
   18. │   └─srvyr:::stop_for_factor(x)
   19. │     └─base::stop(...)
   20. └─base::.handleSimpleError(...)
   21.   └─dplyr (local) h(simpleError(msg, call))
   22.     └─rlang::abort(bullets, call = error_call, parent = skip_internal_condition(e))
   23.       └─rlang:::signal_abort(cnd, .file)
   24.         └─base::signalCondition(cnd)
   25.           ├─base::conditionMessage(cond)
   26.           └─rlang:::conditionMessage.rlang_error(cond)
   27.             └─rlang::cnd_message(c)
   28.               └─rlang:::cnd_message_format(cnd, ...)
   29.                 └─rlang (local) cli_format(glue_escape(lines))
   30.                   └─rlang:::.rlang_cli_format(x, cli::format_error)
   31.                     └─cli::cli_format(x, .envir = emptyenv())
   32.                       └─cli:::fmt(...)
   33.                         └─cli:::cli__fmt(rec, collapse, strip_newline, app)
   34.                           ├─base::do.call(app[[msg$type]], msg$args)
   35.                           └─cli (local) `<fn>`(text = `<named list>`, id = "cli-24140-625", class = NULL)
   36.                             └─cli:::clii_bullets(app, text, id, class)
   37.                               └─base::lapply(...)
   38.                                 └─cli (local) FUN(X[[i]], ...)
   39.                                   └─app$text(text[[i]])
   40.                                     └─cli:::clii_text(app, text)
   41.                                       └─app$xtext(text)
   42.                                         └─cli:::clii__xtext(...)
   43.                                           └─cli::ansi_strwrap(text, exdent = exdent, width = app$get_width(extra = padding))
   44.                                             └─base::lapply(pars, ansi_trimws)
   45.                                               └─cli (local) FUN(X[[i]], ...)
  
  [ FAIL 18 | WARN 0 | SKIP 0 | PASS 379 ]
  Error: Test failures
  Execution halted