Running 'testthat.R' [59s]
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(crosstable)
  > 
  > test_check("crosstable")
  Starting 2 test processes.
  Saving _problems/test-by_numeric-27.R
  Saving _problems/test-by_numeric-119.R
  Saving _problems/test-compact-66.R
  Saving _problems/test-by_factor-23.R
  Saving _problems/test-by_factor-38.R
  Saving _problems/test-by_factor-57.R
  Saving _problems/test-by_factor-80.R
  Saving _problems/test-by_factor-100.R
  Saving _problems/test-by_factor-142.R
  Saving _problems/test-by_factor-184.R
  Saving _problems/test-by_factor-194.R
  Saving _problems/test-by_factor-215.R
  Saving _problems/test-by_factor-227.R
  Saving _problems/test-by_factor-258.R
  Saving _problems/test-by_factor-285.R
  Saving _problems/test-by_factor-294.R
  Saving _problems/test-by_factor-302.R
  Saving _problems/test-effects-9.R
  Saving _problems/test-effects-80.R
  Saving _problems/test-effects-95.R
  Saving _problems/test-flextable-2.R
  Saving _problems/test-crosstable-6.R
  Saving _problems/test-crosstable-28.R
  Saving _problems/test-options-4.R
  Saving _problems/test-pivot-11.R
  Saving _problems/test-tests-11.R
  Saving _problems/test-tests-98.R
  Saving _problems/test-tests-108.R
  Saving _problems/test-selection-9.R
  Saving _problems/test-selection-82.R
  Saving _problems/test-selection-181.R
  Saving _problems/test-selection-216.R
  Saving _problems/test-selection-240.R
  Saving _problems/test-selection-251.R
  [ FAIL 34 | WARN 0 | SKIP 19 | PASS 223 ]
  
  ══ Skipped tests (19) ══════════════════════════════════════════════════════════
  • On CRAN (19): 'test-effects_snap.R:2:1', 'test-officer.R:1:1',
    'test-by_numeric.R:126:1', 'test-cbind.R:1:1', 'test-compact.R:5:1',
    'test-compact.R:20:1', 'test-compact.R:43:1', 'test-by_factor.R:334:1',
    'test-crosstable.R:137:1', 'test-format.R:4:1', 'test-format.R:65:1',
    'test-labels.R:7:1', 'test-labels.R:40:1', 'test-labels.R:197:3',
    'test-labels.R:212:1', 'test-quick_surv.R:1:1', 'test-methods.R:14:1',
    'test-tests.R:85:3', 'test-selection.R:259:1'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-by_numeric.R:27:3'): by factor if numeric <= 3 levels ──────────
  <purrr_error_indexed/rlang_error/error/condition>
  Error in `map2(.x, vec_index(.x), .f, ...)`: i In index: 1.
  i With name: cyl.
  Caused by error in `as.data.frame.integer()`:
  ! row names contain missing values
  Backtrace:
       ▆
    1. ├─crosstable::crosstable(...) at test-by_numeric.R:27:3
    2. │ └─crosstable:::cross_by(...)
    3. │   ├─... %>% list_rbind()
    4. │   └─purrr::imap(...)
    5. │     └─purrr::map2(.x, vec_index(.x), .f, ...)
    6. │       └─purrr:::map2_("list", .x, .y, .f, ..., .progress = .progress)
    7. │         ├─purrr:::with_indexed_errors(...)
    8. │         │ └─base::withCallingHandlers(...)
    9. │         ├─purrr:::call_with_cleanup(...)
   10. │         └─crosstable (local) .f(.x[[i]], .y[[i]], ...)
   11. │           └─crosstable:::cross_categorical(...)
   12. │             └─crosstable:::summarize_categorical_by(...)
   13. │               └─crosstable:::summarize_categorical_single(...)
   14. │                 └─... %>% select(x = 1, n = 2)
   15. ├─purrr::list_rbind(.)
   16. │ └─purrr:::check_list_of_data_frames(x)
   17. │   └─vctrs::obj_check_list(x, call = error_call)
   18. ├─dplyr::select(., x = 1, n = 2)
   19. ├─base::as.data.frame(.)
   20. ├─crosstable:::as.data.frame.table(.)
   21. │ └─base::as.data.frame.table(..., stringsAsFactors = FALSE)
   22. │   ├─base::eval(ex)
   23. │   │ └─base::eval(ex)
   24. │   └─base::data.frame(...)
   25. │     ├─base::as.data.frame(x[[i]], optional = TRUE)
   26. │     └─base::as.data.frame.integer(x[[i]], optional = TRUE)
   27. │       └─base::stop("row names contain missing values")
   28. └─base::.handleSimpleError(...)
   29.   └─purrr (local) h(simpleError(msg, call))
   30.     └─cli::cli_abort(...)
   31.       └─rlang::abort(...)
  ── Error ('test-by_numeric.R:117:3'): Function arguments work ──────────────────
  <purrr_error_indexed/rlang_error/error/condition>
  Error in `map2(.x, vec_index(.x), .f, ...)`: i In index: 3.
  i With name: am.
  Caused by error in `as.data.frame.integer()`:
  ! row names contain missing values
  Backtrace:
       ▆
    1. ├─crosstable::crosstable(...) at test-by_numeric.R:117:3
    2. │ └─crosstable:::cross_by(...)
    3. │   ├─... %>% list_rbind()
    4. │   └─purrr::imap(...)
    5. │     └─purrr::map2(.x, vec_index(.x), .f, ...)
    6. │       └─purrr:::map2_("list", .x, .y, .f, ..., .progress = .progress)
    7. │         ├─purrr:::with_indexed_errors(...)
    8. │         │ └─base::withCallingHandlers(...)
    9. │         ├─purrr:::call_with_cleanup(...)
   10. │         └─crosstable (local) .f(.x[[i]], .y[[i]], ...)
   11. │           └─crosstable:::cross_categorical(...)
   12. │             └─crosstable:::summarize_categorical_by(...)
   13. │               └─marginSums(nn3, margin = 2) %>% as.data.frame(responseName = "n_col_na")
   14. ├─purrr::list_rbind(.)
   15. │ └─purrr:::check_list_of_data_frames(x)
   16. │   └─vctrs::obj_check_list(x, call = error_call)
   17. ├─base::as.data.frame(., responseName = "n_col_na")
   18. ├─crosstable:::as.data.frame.table(., responseName = "n_col_na")
   19. │ └─base::as.data.frame.table(..., stringsAsFactors = FALSE)
   20. │   ├─base::eval(ex)
   21. │   │ └─base::eval(ex)
   22. │   └─base::data.frame(...)
   23. │     ├─base::as.data.frame(x[[i]], optional = TRUE)
   24. │     └─base::as.data.frame.integer(x[[i]], optional = TRUE)
   25. │       └─base::stop("row names contain missing values")
   26. └─base::.handleSimpleError(...)
   27.   └─purrr (local) h(simpleError(msg, call))
   28.     └─cli::cli_abort(...)
   29.       └─rlang::abort(...)
  ── Error ('test-compact.R:64:3'): Compact method OK with as_flextable() ────────
  <purrr_error_indexed/rlang_error/error/condition>
  Error in `map2(.x, vec_index(.x), .f, ...)`: i In index: 1.
  i With name: am.
  Caused by error in `as.data.frame.integer()`:
  ! row names contain missing values
  Backtrace:
       ▆
    1. ├─mtcars2 %>% apply_labels(am = "Engine") %>% ... at test-compact.R:64:3
    2. ├─crosstable::crosstable(., c(am, vs))
    3. │ └─crosstable:::cross_by(...)
    4. │   ├─... %>% list_rbind()
    5. │   └─purrr::imap(...)
    6. │     └─purrr::map2(.x, vec_index(.x), .f, ...)
    7. │       └─purrr:::map2_("list", .x, .y, .f, ..., .progress = .progress)
    8. │         ├─purrr:::with_indexed_errors(...)
    9. │         │ └─base::withCallingHandlers(...)
   10. │         ├─purrr:::call_with_cleanup(...)
   11. │         └─crosstable (local) .f(.x[[i]], .y[[i]], ...)
   12. │           └─crosstable:::cross_categorical(...)
   13. │             └─crosstable:::summarize_categorical_single(...)
   14. │               └─... %>% select(x = 1, n = 2)
   15. ├─purrr::list_rbind(.)
   16. │ └─purrr:::check_list_of_data_frames(x)
   17. │   └─vctrs::obj_check_list(x, call = error_call)
   18. ├─dplyr::select(., x = 1, n = 2)
   19. ├─base::as.data.frame(.)
   20. ├─crosstable:::as.data.frame.table(.)
   21. │ └─base::as.data.frame.table(..., stringsAsFactors = FALSE)
   22. │   ├─base::eval(ex)
   23. │   │ └─base::eval(ex)
   24. │   └─base::data.frame(...)
   25. │     ├─base::as.data.frame(x[[i]], optional = TRUE)
   26. │     └─base::as.data.frame.integer(x[[i]], optional = TRUE)
   27. │       └─base::stop("row names contain missing values")
   28. └─base::.handleSimpleError(...)
   29.   └─purrr (local) h(simpleError(msg, call))
   30.     └─cli::cli_abort(...)
   31.       └─rlang::abort(...)
  ── Error ('test-by_factor.R:14:3'): showNA with NA in by ───────────────────────
  Error: object 'x3' not found
  Backtrace:
      ▆
   1. └─base::as.data.frame(x3)
  ── Error ('test-by_factor.R:29:3'): showNA without NA in by ────────────────────
  Error: object 'x3' not found
  Backtrace:
      ▆
   1. └─base::as.data.frame(x3)
  ── Error ('test-by_factor.R:46:3'): total ──────────────────────────────────────
  Error: object 'x4' not found
  Backtrace:
      ▆
   1. └─base::as.data.frame(x4)
  ── Error ('test-by_factor.R:65:3'): Margins without totals ─────────────────────
  Error: object 'x6' not found
  Backtrace:
      ▆
   1. └─base::as.data.frame(x6)
  ── Error ('test-by_factor.R:85:3'): Margins with totals ────────────────────────
  Error: object 'x6' not found
  Backtrace:
      ▆
   1. └─base::as.data.frame(x6)
  ── Error ('test-by_factor.R:126:3'): Percent pattern ───────────────────────────
  Error: object 'x2' not found
  Backtrace:
      ▆
   1. └─base::as.data.frame(x2)
  ── Error ('test-by_factor.R:173:3'): Percent pattern - Ultimate ────────────────
  Error: object 'x2' not found
  Backtrace:
      ▆
   1. └─base::as.data.frame(x2)
  ── Error ('test-by_factor.R:194:3'): tables with lots of NA don't cause error ──
  <purrr_error_indexed/rlang_error/error/condition>
  Error in `map2(.x, vec_index(.x), .f, ...)`: i In index: 1.
  i With name: x.
  Caused by error in `as.data.frame.integer()`:
  ! row names contain missing values
  Backtrace:
       ▆
    1. ├─crosstable::crosstable(df, x, by = y, total = TRUE) at test-by_factor.R:194:3
    2. │ └─crosstable:::cross_by(...)
    3. │   ├─... %>% list_rbind()
    4. │   └─purrr::imap(...)
    5. │     └─purrr::map2(.x, vec_index(.x), .f, ...)
    6. │       └─purrr:::map2_("list", .x, .y, .f, ..., .progress = .progress)
    7. │         ├─purrr:::with_indexed_errors(...)
    8. │         │ └─base::withCallingHandlers(...)
    9. │         ├─purrr:::call_with_cleanup(...)
   10. │         └─crosstable (local) .f(.x[[i]], .y[[i]], ...)
   11. │           └─crosstable:::cross_categorical(...)
   12. │             └─crosstable:::summarize_categorical_by(...)
   13. │               └─marginSums(nn3, margin = 1) %>% as.data.frame(responseName = "n_row_na")
   14. ├─purrr::list_rbind(.)
   15. │ └─purrr:::check_list_of_data_frames(x)
   16. │   └─vctrs::obj_check_list(x, call = error_call)
   17. ├─base::as.data.frame(., responseName = "n_row_na")
   18. ├─crosstable:::as.data.frame.table(., responseName = "n_row_na")
   19. │ └─base::as.data.frame.table(..., stringsAsFactors = FALSE)
   20. │   ├─base::eval(ex)
   21. │   │ └─base::eval(ex)
   22. │   └─base::data.frame(...)
   23. │     ├─base::as.data.frame(x[[i]], optional = TRUE)
   24. │     └─base::as.data.frame.integer(x[[i]], optional = TRUE)
   25. │       └─base::stop("row names contain missing values")
   26. └─base::.handleSimpleError(...)
   27.   └─purrr (local) h(simpleError(msg, call))
   28.     └─cli::cli_abort(...)
   29.       └─rlang::abort(...)
  ── Error ('test-by_factor.R:208:3'): Unique numeric ────────────────────────────
  Error: object 'x2' not found
  Backtrace:
      ▆
   1. └─base::as.data.frame(x2)
  ── Error ('test-by_factor.R:226:3'): drop_levels works ─────────────────────────
  <purrr_error_indexed/rlang_error/error/condition>
  Error in `map2(.x, vec_index(.x), .f, ...)`: i In index: 1.
  i With name: am.
  Caused by error in `as.data.frame.integer()`:
  ! row names contain missing values
  Backtrace:
       ▆
    1. ├─... %>% expect_equal(c("auto", "manual", "other")) at test-by_factor.R:226:3
    2. ├─testthat::expect_equal(., c("auto", "manual", "other"))
    3. │ └─testthat::quasi_label(enquo(object), label)
    4. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    5. ├─dplyr::pull(., variable)
    6. ├─crosstable::crosstable(., am, drop_levels = FALSE)
    7. │ └─crosstable:::cross_by(...)
    8. │   ├─... %>% list_rbind()
    9. │   └─purrr::imap(...)
   10. │     └─purrr::map2(.x, vec_index(.x), .f, ...)
   11. │       └─purrr:::map2_("list", .x, .y, .f, ..., .progress = .progress)
   12. │         ├─purrr:::with_indexed_errors(...)
   13. │         │ └─base::withCallingHandlers(...)
   14. │         ├─purrr:::call_with_cleanup(...)
   15. │         └─crosstable (local) .f(.x[[i]], .y[[i]], ...)
   16. │           └─crosstable:::cross_categorical(...)
   17. │             └─crosstable:::summarize_categorical_single(...)
   18. │               └─... %>% select(x = 1, n = 2)
   19. ├─purrr::list_rbind(.)
   20. │ └─purrr:::check_list_of_data_frames(x)
   21. │   └─vctrs::obj_check_list(x, call = error_call)
   22. ├─dplyr::select(., x = 1, n = 2)
   23. ├─base::as.data.frame(.)
   24. ├─crosstable:::as.data.frame.table(.)
   25. │ └─base::as.data.frame.table(..., stringsAsFactors = FALSE)
   26. │   ├─base::eval(ex)
   27. │   │ └─base::eval(ex)
   28. │   └─base::data.frame(...)
   29. │     ├─base::as.data.frame(x[[i]], optional = TRUE)
   30. │     └─base::as.data.frame.integer(x[[i]], optional = TRUE)
   31. │       └─base::stop("row names contain missing values")
   32. └─base::.handleSimpleError(...)
   33.   └─purrr (local) h(simpleError(msg, call))
   34.     └─cli::cli_abort(...)
   35.       └─rlang::abort(...)
  ── Error ('test-by_factor.R:253:3'): By dummy ──────────────────────────────────
  Error: object 'x1' not found
  Backtrace:
      ▆
   1. └─base::as.data.frame(x1)
  ── Error ('test-by_factor.R:272:3'): By multiple ───────────────────────────────
  Error: object 'x4' not found
  Backtrace:
      ▆
   1. └─base::as.data.frame(x4)
  ── Error ('test-by_factor.R:291:3'): By multiple (formula) ─────────────────────
  <purrr_error_indexed/rlang_error/error/condition>
  Error in `map2(.x, vec_index(.x), .f, ...)`: i In index: 2.
  i With name: gear.
  Caused by error in `as.data.frame.integer()`:
  ! row names contain missing values
  Backtrace:
       ▆
    1. ├─crosstable::crosstable(...)
    2. │ └─crosstable:::cross_by(...)
    3. │   ├─... %>% list_rbind()
    4. │   └─purrr::imap(...)
    5. │     └─purrr::map2(.x, vec_index(.x), .f, ...)
    6. │       └─purrr:::map2_("list", .x, .y, .f, ..., .progress = .progress)
    7. │         ├─purrr:::with_indexed_errors(...)
    8. │         │ └─base::withCallingHandlers(...)
    9. │         ├─purrr:::call_with_cleanup(...)
   10. │         └─crosstable (local) .f(.x[[i]], .y[[i]], ...)
   11. │           └─crosstable:::cross_categorical(...)
   12. │             └─crosstable:::summarize_categorical_by(...)
   13. │               └─crosstable:::summarize_categorical_single(...)
   14. │                 └─... %>% select(x = 1, n = 2)
   15. ├─purrr::list_rbind(.)
   16. │ └─purrr:::check_list_of_data_frames(x)
   17. │   └─vctrs::obj_check_list(x, call = error_call)
   18. ├─dplyr::select(., x = 1, n = 2)
   19. ├─base::as.data.frame(.)
   20. ├─crosstable:::as.data.frame.table(.)
   21. │ └─base::as.data.frame.table(..., stringsAsFactors = FALSE)
   22. │   ├─base::eval(ex)
   23. │   │ └─base::eval(ex)
   24. │   └─base::data.frame(...)
   25. │     ├─base::as.data.frame(x[[i]], optional = TRUE)
   26. │     └─base::as.data.frame.integer(x[[i]], optional = TRUE)
   27. │       └─base::stop("row names contain missing values")
   28. └─base::.handleSimpleError(...)
   29.   └─purrr (local) h(simpleError(msg, call))
   30.     └─cli::cli_abort(...)
   31.       └─rlang::abort(...)
  ── Error ('test-by_factor.R:301:3'): By multiple warnings ──────────────────────
  <purrr_error_indexed/rlang_error/error/condition>
  Error in `map2(.x, vec_index(.x), .f, ...)`: i In index: 3.
  i With name: cyl.
  Caused by error in `as.data.frame.integer()`:
  ! row names contain missing values
  Backtrace:
       ▆
    1. ├─... %>% ... at test-by_factor.R:301:3
    2. ├─crosstable:::expect_warning2(., class = "crosstable_multiby_wrong_class_warning")
    3. │ └─testthat::expect_warning(object, ...) at ./helper-init_dataset.R:121:3
    4. │   └─testthat:::expect_condition_matching_(...)
    5. │     └─testthat:::quasi_capture(...)
    6. │       ├─testthat (local) .capture(...)
    7. │       │ └─base::withCallingHandlers(...)
    8. │       └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    9. ├─crosstable::crosstable(...)
   10. │ └─crosstable:::cross_by(...)
   11. │   ├─... %>% list_rbind()
   12. │   └─purrr::imap(...)
   13. │     └─purrr::map2(.x, vec_index(.x), .f, ...)
   14. │       └─purrr:::map2_("list", .x, .y, .f, ..., .progress = .progress)
   15. │         ├─purrr:::with_indexed_errors(...)
   16. │         │ └─base::withCallingHandlers(...)
   17. │         ├─purrr:::call_with_cleanup(...)
   18. │         └─crosstable (local) .f(.x[[i]], .y[[i]], ...)
   19. │           └─crosstable:::cross_categorical(...)
   20. │             └─crosstable:::summarize_categorical_by(...)
   21. │               └─marginSums(nn3, margin = 1) %>% as.data.frame(responseName = "n_row_na")
   22. ├─purrr::list_rbind(.)
   23. │ └─purrr:::check_list_of_data_frames(x)
   24. │   └─vctrs::obj_check_list(x, call = error_call)
   25. ├─base::as.data.frame(., responseName = "n_row_na")
   26. ├─crosstable:::as.data.frame.table(., responseName = "n_row_na")
   27. │ └─base::as.data.frame.table(..., stringsAsFactors = FALSE)
   28. │   ├─base::eval(ex)
   29. │   │ └─base::eval(ex)
   30. │   └─base::data.frame(...)
   31. │     ├─base::as.data.frame(x[[i]], optional = TRUE)
   32. │     └─base::as.data.frame.integer(x[[i]], optional = TRUE)
   33. │       └─base::stop("row names contain missing values")
   34. └─base::.handleSimpleError(...)
   35.   └─purrr (local) h(simpleError(msg, call))
   36.     └─cli::cli_abort(...)
   37.       └─rlang::abort(...)
  ── Error ('test-effects.R:9:3'): Effects: categorical variables ────────────────
  <purrr_error_indexed/rlang_error/error/condition>
  Error in `map2(.x, vec_index(.x), .f, ...)`: i In index: 1.
  i With name: am.
  Caused by error in `as.data.frame.integer()`:
  ! row names contain missing values
  Backtrace:
       ▆
    1. ├─crosstable::crosstable(mtcars3, am, by = vs, effect = T, effect_args = e_args) at test-effects.R:9:3
    2. │ └─crosstable:::cross_by(...)
    3. │   ├─... %>% list_rbind()
    4. │   └─purrr::imap(...)
    5. │     └─purrr::map2(.x, vec_index(.x), .f, ...)
    6. │       └─purrr:::map2_("list", .x, .y, .f, ..., .progress = .progress)
    7. │         ├─purrr:::with_indexed_errors(...)
    8. │         │ └─base::withCallingHandlers(...)
    9. │         ├─purrr:::call_with_cleanup(...)
   10. │         └─crosstable (local) .f(.x[[i]], .y[[i]], ...)
   11. │           └─crosstable:::cross_categorical(...)
   12. │             └─crosstable:::summarize_categorical_by(...)
   13. │               └─marginSums(nn3, margin = 2) %>% as.data.frame(responseName = "n_col_na")
   14. ├─purrr::list_rbind(.)
   15. │ └─purrr:::check_list_of_data_frames(x)
   16. │   └─vctrs::obj_check_list(x, call = error_call)
   17. ├─base::as.data.frame(., responseName = "n_col_na")
   18. ├─crosstable:::as.data.frame.table(., responseName = "n_col_na")
   19. │ └─base::as.data.frame.table(..., stringsAsFactors = FALSE)
   20. │   ├─base::eval(ex)
   21. │   │ └─base::eval(ex)
   22. │   └─base::data.frame(...)
   23. │     ├─base::as.data.frame(x[[i]], optional = TRUE)
   24. │     └─base::as.data.frame.integer(x[[i]], optional = TRUE)
   25. │       └─base::stop("row names contain missing values")
   26. └─base::.handleSimpleError(...)
   27.   └─purrr (local) h(simpleError(msg, call))
   28.     └─cli::cli_abort(...)
   29.       └─rlang::abort(...)
  ── Error ('test-effects.R:79:3'): Effects: missing variables ───────────────────
  <purrr_error_indexed/rlang_error/error/condition>
  Error in `map2(.x, vec_index(.x), .f, ...)`: i In index: 1.
  i With name: x.
  Caused by error in `as.data.frame.integer()`:
  ! row names contain missing values
  Backtrace:
       ▆
    1. ├─crosstable(mtcars3, x, by = vs, effect = T) %>% ... at test-effects.R:79:3
    2. ├─crosstable:::expect_warning2(., class = "crosstable_effect_warning")
    3. │ └─testthat::expect_warning(object, ...) at ./helper-init_dataset.R:121:3
    4. │   └─testthat:::expect_condition_matching_(...)
    5. │     └─testthat:::quasi_capture(...)
    6. │       ├─testthat (local) .capture(...)
    7. │       │ └─base::withCallingHandlers(...)
    8. │       └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    9. ├─crosstable::crosstable(mtcars3, x, by = vs, effect = T)
   10. │ └─crosstable:::cross_by(...)
   11. │   ├─... %>% list_rbind()
   12. │   └─purrr::imap(...)
   13. │     └─purrr::map2(.x, vec_index(.x), .f, ...)
   14. │       └─purrr:::map2_("list", .x, .y, .f, ..., .progress = .progress)
   15. │         ├─purrr:::with_indexed_errors(...)
   16. │         │ └─base::withCallingHandlers(...)
   17. │         ├─purrr:::call_with_cleanup(...)
   18. │         └─crosstable (local) .f(.x[[i]], .y[[i]], ...)
   19. │           └─crosstable:::cross_categorical(...)
   20. │             └─crosstable:::summarize_categorical_by(...)
   21. │               └─marginSums(nn3, margin = 2) %>% as.data.frame(responseName = "n_col_na")
   22. ├─purrr::list_rbind(.)
   23. │ └─purrr:::check_list_of_data_frames(x)
   24. │   └─vctrs::obj_check_list(x, call = error_call)
   25. ├─base::as.data.frame(., responseName = "n_col_na")
   26. ├─crosstable:::as.data.frame.table(., responseName = "n_col_na")
   27. │ └─base::as.data.frame.table(..., stringsAsFactors = FALSE)
   28. │   ├─base::eval(ex)
   29. │   │ └─base::eval(ex)
   30. │   └─base::data.frame(...)
   31. │     ├─base::as.data.frame(x[[i]], optional = TRUE)
   32. │     └─base::as.data.frame.integer(x[[i]], optional = TRUE)
   33. │       └─base::stop("row names contain missing values")
   34. └─base::.handleSimpleError(...)
   35.   └─purrr (local) h(simpleError(msg, call))
   36.     └─cli::cli_abort(...)
   37.       └─rlang::abort(...)
  ── Error ('test-effects.R:94:3'): Effects Warnings ─────────────────────────────
  <purrr_error_indexed/rlang_error/error/condition>
  Error in `map2(.x, vec_index(.x), .f, ...)`: i In index: 1.
  i With name: cyl.
  Caused by error in `as.data.frame.integer()`:
  ! row names contain missing values
  Backtrace:
       ▆
    1. ├─crosstable(mtcars3, cyl, by = c(am, vs), effect = T) %>% ... at test-effects.R:94:3
    2. ├─testthat::expect_warning(., class = "crosstable_multiby_effect_warning")
    3. │ └─testthat:::expect_condition_matching_(...)
    4. │   └─testthat:::quasi_capture(...)
    5. │     ├─testthat (local) .capture(...)
    6. │     │ └─base::withCallingHandlers(...)
    7. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    8. ├─crosstable::crosstable(mtcars3, cyl, by = c(am, vs), effect = T)
    9. │ └─crosstable:::cross_by(...)
   10. │   ├─... %>% list_rbind()
   11. │   └─purrr::imap(...)
   12. │     └─purrr::map2(.x, vec_index(.x), .f, ...)
   13. │       └─purrr:::map2_("list", .x, .y, .f, ..., .progress = .progress)
   14. │         ├─purrr:::with_indexed_errors(...)
   15. │         │ └─base::withCallingHandlers(...)
   16. │         ├─purrr:::call_with_cleanup(...)
   17. │         └─crosstable (local) .f(.x[[i]], .y[[i]], ...)
   18. │           └─crosstable:::cross_categorical(...)
   19. │             └─crosstable:::summarize_categorical_by(...)
   20. │               └─marginSums(nn3, margin = 1) %>% as.data.frame(responseName = "n_row_na")
   21. ├─purrr::list_rbind(.)
   22. │ └─purrr:::check_list_of_data_frames(x)
   23. │   └─vctrs::obj_check_list(x, call = error_call)
   24. ├─base::as.data.frame(., responseName = "n_row_na")
   25. ├─crosstable:::as.data.frame.table(., responseName = "n_row_na")
   26. │ └─base::as.data.frame.table(..., stringsAsFactors = FALSE)
   27. │   ├─base::eval(ex)
   28. │   │ └─base::eval(ex)
   29. │   └─base::data.frame(...)
   30. │     ├─base::as.data.frame(x[[i]], optional = TRUE)
   31. │     └─base::as.data.frame.integer(x[[i]], optional = TRUE)
   32. │       └─base::stop("row names contain missing values")
   33. └─base::.handleSimpleError(...)
   34.   └─purrr (local) h(simpleError(msg, call))
   35.     └─cli::cli_abort(...)
   36.       └─rlang::abort(...)
  ── Error ('test-flextable.R:2:1'): (code run outside of `test_that()`) ─────────
  <purrr_error_indexed/rlang_error/error/condition>
  Error in `map2(.x, vec_index(.x), .f, ...)`: i In index: 2.
  i With name: am.
  Caused by error in `as.data.frame.integer()`:
  ! row names contain missing values
  Backtrace:
       ▆
    1. ├─crosstable::crosstable(mtcars3, c(mpg, am)) at test-flextable.R:2:1
    2. │ └─crosstable:::cross_by(...)
    3. │   ├─... %>% list_rbind()
    4. │   └─purrr::imap(...)
    5. │     └─purrr::map2(.x, vec_index(.x), .f, ...)
    6. │       └─purrr:::map2_("list", .x, .y, .f, ..., .progress = .progress)
    7. │         ├─purrr:::with_indexed_errors(...)
    8. │         │ └─base::withCallingHandlers(...)
    9. │         ├─purrr:::call_with_cleanup(...)
   10. │         └─crosstable (local) .f(.x[[i]], .y[[i]], ...)
   11. │           └─crosstable:::cross_categorical(...)
   12. │             └─crosstable:::summarize_categorical_single(...)
   13. │               └─... %>% select(x = 1, n = 2)
   14. ├─purrr::list_rbind(.)
   15. │ └─purrr:::check_list_of_data_frames(x)
   16. │   └─vctrs::obj_check_list(x, call = error_call)
   17. ├─dplyr::select(., x = 1, n = 2)
   18. ├─base::as.data.frame(.)
   19. ├─crosstable:::as.data.frame.table(.)
   20. │ └─base::as.data.frame.table(..., stringsAsFactors = FALSE)
   21. │   ├─base::eval(ex)
   22. │   │ └─base::eval(ex)
   23. │   └─base::data.frame(...)
   24. │     ├─base::as.data.frame(x[[i]], optional = TRUE)
   25. │     └─base::as.data.frame.integer(x[[i]], optional = TRUE)
   26. │       └─base::stop("row names contain missing values")
   27. └─base::.handleSimpleError(...)
   28.   └─purrr (local) h(simpleError(msg, call))
   29.     └─cli::cli_abort(...)
   30.       └─rlang::abort(...)
  ── Error ('test-crosstable.R:6:3'): numeric+factor+surv by nothing ─────────────
  <purrr_error_indexed/rlang_error/error/condition>
  Error in `map2(.x, vec_index(.x), .f, ...)`: i In index: 1.
  i With name: am.
  Caused by error in `as.data.frame.integer()`:
  ! row names contain missing values
  Backtrace:
       ▆
    1. ├─crosstable::crosstable(mtcars3, c(am, mpg, cyl, surv)) at test-crosstable.R:6:3
    2. │ └─crosstable:::cross_by(...)
    3. │   ├─... %>% list_rbind()
    4. │   └─purrr::imap(...)
    5. │     └─purrr::map2(.x, vec_index(.x), .f, ...)
    6. │       └─purrr:::map2_("list", .x, .y, .f, ..., .progress = .progress)
    7. │         ├─purrr:::with_indexed_errors(...)
    8. │         │ └─base::withCallingHandlers(...)
    9. │         ├─purrr:::call_with_cleanup(...)
   10. │         └─crosstable (local) .f(.x[[i]], .y[[i]], ...)
   11. │           └─crosstable:::cross_categorical(...)
   12. │             └─crosstable:::summarize_categorical_single(...)
   13. │               └─... %>% select(x = 1, n = 2)
   14. ├─purrr::list_rbind(.)
   15. │ └─purrr:::check_list_of_data_frames(x)
   16. │   └─vctrs::obj_check_list(x, call = error_call)
   17. ├─dplyr::select(., x = 1, n = 2)
   18. ├─base::as.data.frame(.)
   19. ├─crosstable:::as.data.frame.table(.)
   20. │ └─base::as.data.frame.table(..., stringsAsFactors = FALSE)
   21. │   ├─base::eval(ex)
   22. │   │ └─base::eval(ex)
   23. │   └─base::data.frame(...)
   24. │     ├─base::as.data.frame(x[[i]], optional = TRUE)
   25. │     └─base::as.data.frame.integer(x[[i]], optional = TRUE)
   26. │       └─base::stop("row names contain missing values")
   27. └─base::.handleSimpleError(...)
   28.   └─purrr (local) h(simpleError(msg, call))
   29.     └─cli::cli_abort(...)
   30.       └─rlang::abort(...)
  ── Error ('test-crosstable.R:26:3'): Contains both `NA` and "NA" ───────────────
  <purrr_error_indexed/rlang_error/error/condition>
  Error in `map2(.x, vec_index(.x), .f, ...)`: i In index: 1.
  i With name: a.
  Caused by error in `as.data.frame.integer()`:
  ! row names contain missing values
  Backtrace:
       ▆
    1. ├─crosstable(x, a) %>% pull(variable) %>% ... at test-crosstable.R:26:3
    2. ├─testthat::expect_identical(., c("zzz", "aaa", "\"NA\"", "NA"))
    3. │ └─testthat::quasi_label(enquo(object), label)
    4. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    5. ├─dplyr::pull(., variable)
    6. ├─crosstable::crosstable(x, a)
    7. │ └─crosstable:::cross_by(...)
    8. │   ├─... %>% list_rbind()
    9. │   └─purrr::imap(...)
   10. │     └─purrr::map2(.x, vec_index(.x), .f, ...)
   11. │       └─purrr:::map2_("list", .x, .y, .f, ..., .progress = .progress)
   12. │         ├─purrr:::with_indexed_errors(...)
   13. │         │ └─base::withCallingHandlers(...)
   14. │         ├─purrr:::call_with_cleanup(...)
   15. │         └─crosstable (local) .f(.x[[i]], .y[[i]], ...)
   16. │           └─crosstable:::cross_categorical(...)
   17. │             └─crosstable:::summarize_categorical_single(...)
   18. │               └─... %>% select(x = 1, n = 2)
   19. ├─purrr::list_rbind(.)
   20. │ └─purrr:::check_list_of_data_frames(x)
   21. │   └─vctrs::obj_check_list(x, call = error_call)
   22. ├─dplyr::select(., x = 1, n = 2)
   23. ├─base::as.data.frame(.)
   24. ├─crosstable:::as.data.frame.table(.)
   25. │ └─base::as.data.frame.table(..., stringsAsFactors = FALSE)
   26. │   ├─base::eval(ex)
   27. │   │ └─base::eval(ex)
   28. │   └─base::data.frame(...)
   29. │     ├─base::as.data.frame(x[[i]], optional = TRUE)
   30. │     └─base::as.data.frame.integer(x[[i]], optional = TRUE)
   31. │       └─base::stop("row names contain missing values")
   32. └─base::.handleSimpleError(...)
   33.   └─purrr (local) h(simpleError(msg, call))
   34.     └─cli::cli_abort(...)
   35.       └─rlang::abort(...)
  ── Error ('test-options.R:4:1'): (code run outside of `test_that()`) ───────────
  <purrr_error_indexed/rlang_error/error/condition>
  Error in `map2(.x, vec_index(.x), .f, ...)`: i In index: 1.
  i With name: x.
  Caused by error in `as.data.frame.integer()`:
  ! row names contain missing values
  Backtrace:
       ▆
    1. ├─crosstable::crosstable(t, cols = c("x")) at test-options.R:4:1
    2. │ └─crosstable:::cross_by(...)
    3. │   ├─... %>% list_rbind()
    4. │   └─purrr::imap(...)
    5. │     └─purrr::map2(.x, vec_index(.x), .f, ...)
    6. │       └─purrr:::map2_("list", .x, .y, .f, ..., .progress = .progress)
    7. │         ├─purrr:::with_indexed_errors(...)
    8. │         │ └─base::withCallingHandlers(...)
    9. │         ├─purrr:::call_with_cleanup(...)
   10. │         └─crosstable (local) .f(.x[[i]], .y[[i]], ...)
   11. │           └─crosstable:::cross_categorical(...)
   12. │             └─crosstable:::summarize_categorical_single(...)
   13. │               └─... %>% select(x = 1, n = 2)
   14. ├─purrr::list_rbind(.)
   15. │ └─purrr:::check_list_of_data_frames(x)
   16. │   └─vctrs::obj_check_list(x, call = error_call)
   17. ├─dplyr::select(., x = 1, n = 2)
   18. ├─base::as.data.frame(.)
   19. ├─crosstable:::as.data.frame.table(.)
   20. │ └─base::as.data.frame.table(..., stringsAsFactors = FALSE)
   21. │   ├─base::eval(ex)
   22. │   │ └─base::eval(ex)
   23. │   └─base::data.frame(...)
   24. │     ├─base::as.data.frame(x[[i]], optional = TRUE)
   25. │     └─base::as.data.frame.integer(x[[i]], optional = TRUE)
   26. │       └─base::stop("row names contain missing values")
   27. └─base::.handleSimpleError(...)
   28.   └─purrr (local) h(simpleError(msg, call))
   29.     └─cli::cli_abort(...)
   30.       └─rlang::abort(...)
  ── Error ('test-pivot.R:5:1'): (code run outside of `test_that()`) ─────────────
  <purrr_error_indexed/rlang_error/error/condition>
  Error in `map2(.x, vec_index(.x), .f, ...)`: i In index: 1.
  i With name: x.
  Caused by error in `as.data.frame.integer()`:
  ! row names contain missing values
  Backtrace:
       ▆
    1. ├─... %>% crosstable(-letter) at test-pivot.R:5:1
    2. ├─crosstable::crosstable(., -letter)
    3. │ └─crosstable:::cross_by(...)
    4. │   ├─... %>% list_rbind()
    5. │   └─purrr::imap(...)
    6. │     └─purrr::map2(.x, vec_index(.x), .f, ...)
    7. │       └─purrr:::map2_("list", .x, .y, .f, ..., .progress = .progress)
    8. │         ├─purrr:::with_indexed_errors(...)
    9. │         │ └─base::withCallingHandlers(...)
   10. │         ├─purrr:::call_with_cleanup(...)
   11. │         └─crosstable (local) .f(.x[[i]], .y[[i]], ...)
   12. │           └─crosstable:::cross_categorical(...)
   13. │             └─crosstable:::summarize_categorical_single(...)
   14. │               └─... %>% select(x = 1, n = 2)
   15. ├─purrr::list_rbind(.)
   16. │ └─purrr:::check_list_of_data_frames(x)
   17. │   └─vctrs::obj_check_list(x, call = error_call)
   18. ├─dplyr::select(., x = 1, n = 2)
   19. ├─base::as.data.frame(.)
   20. ├─crosstable:::as.data.frame.table(.)
   21. │ └─base::as.data.frame.table(..., stringsAsFactors = FALSE)
   22. │   ├─base::eval(ex)
   23. │   │ └─base::eval(ex)
   24. │   └─base::data.frame(...)
   25. │     ├─base::as.data.frame(x[[i]], optional = TRUE)
   26. │     └─base::as.data.frame.integer(x[[i]], optional = TRUE)
   27. │       └─base::stop("row names contain missing values")
   28. └─base::.handleSimpleError(...)
   29.   └─purrr (local) h(simpleError(msg, call))
   30.     └─cli::cli_abort(...)
   31.       └─rlang::abort(...)
  ── Error ('test-tests.R:11:5'): Statistical Tests ──────────────────────────────
  <purrr_error_indexed/rlang_error/error/condition>
  Error in `map2(.x, vec_index(.x), .f, ...)`: i In index: 1.
  i With name: cyl.
  Caused by error in `as.data.frame.integer()`:
  ! row names contain missing values
  Backtrace:
       ▆
    1. ├─crosstable::crosstable(mtcars3, cyl, by = vs, test = T) at test-tests.R:11:5
    2. │ └─crosstable:::cross_by(...)
    3. │   ├─... %>% list_rbind()
    4. │   └─purrr::imap(...)
    5. │     └─purrr::map2(.x, vec_index(.x), .f, ...)
    6. │       └─purrr:::map2_("list", .x, .y, .f, ..., .progress = .progress)
    7. │         ├─purrr:::with_indexed_errors(...)
    8. │         │ └─base::withCallingHandlers(...)
    9. │         ├─purrr:::call_with_cleanup(...)
   10. │         └─crosstable (local) .f(.x[[i]], .y[[i]], ...)
   11. │           └─crosstable:::cross_categorical(...)
   12. │             └─crosstable:::summarize_categorical_by(...)
   13. │               └─marginSums(nn3, margin = 1) %>% as.data.frame(responseName = "n_row_na")
   14. ├─purrr::list_rbind(.)
   15. │ └─purrr:::check_list_of_data_frames(x)
   16. │   └─vctrs::obj_check_list(x, call = error_call)
   17. ├─base::as.data.frame(., responseName = "n_row_na")
   18. ├─crosstable:::as.data.frame.table(., responseName = "n_row_na")
   19. │ └─base::as.data.frame.table(..., stringsAsFactors = FALSE)
   20. │   ├─base::eval(ex)
   21. │   │ └─base::eval(ex)
   22. │   └─base::data.frame(...)
   23. │     ├─base::as.data.frame(x[[i]], optional = TRUE)
   24. │     └─base::as.data.frame.integer(x[[i]], optional = TRUE)
   25. │       └─base::stop("row names contain missing values")
   26. └─base::.handleSimpleError(...)
   27.   └─purrr (local) h(simpleError(msg, call))
   28.     └─cli::cli_abort(...)
   29.       └─rlang::abort(...)
  ── Error ('test-tests.R:98:5'): 'Test' can be a variable name ──────────────────
  <purrr_error_indexed/rlang_error/error/condition>
  Error in `map2(.x, vec_index(.x), .f, ...)`: i In index: 1.
  i With name: test.
  Caused by error in `as.data.frame.integer()`:
  ! row names contain missing values
  Backtrace:
       ▆
    1. ├─crosstable::crosstable(mtcars3, test, by = vs, test = TRUE) at test-tests.R:98:5
    2. │ └─crosstable:::cross_by(...)
    3. │   ├─... %>% list_rbind()
    4. │   └─purrr::imap(...)
    5. │     └─purrr::map2(.x, vec_index(.x), .f, ...)
    6. │       └─purrr:::map2_("list", .x, .y, .f, ..., .progress = .progress)
    7. │         ├─purrr:::with_indexed_errors(...)
    8. │         │ └─base::withCallingHandlers(...)
    9. │         ├─purrr:::call_with_cleanup(...)
   10. │         └─crosstable (local) .f(.x[[i]], .y[[i]], ...)
   11. │           └─crosstable:::cross_categorical(...)
   12. │             └─crosstable:::summarize_categorical_by(...)
   13. │               └─marginSums(nn3, margin = 2) %>% as.data.frame(responseName = "n_col_na")
   14. ├─purrr::list_rbind(.)
   15. │ └─purrr:::check_list_of_data_frames(x)
   16. │   └─vctrs::obj_check_list(x, call = error_call)
   17. ├─base::as.data.frame(., responseName = "n_col_na")
   18. ├─crosstable:::as.data.frame.table(., responseName = "n_col_na")
   19. │ └─base::as.data.frame.table(..., stringsAsFactors = FALSE)
   20. │   ├─base::eval(ex)
   21. │   │ └─base::eval(ex)
   22. │   └─base::data.frame(...)
   23. │     ├─base::as.data.frame(x[[i]], optional = TRUE)
   24. │     └─base::as.data.frame.integer(x[[i]], optional = TRUE)
   25. │       └─base::stop("row names contain missing values")
   26. └─base::.handleSimpleError(...)
   27.   └─purrr (local) h(simpleError(msg, call))
   28.     └─cli::cli_abort(...)
   29.       └─rlang::abort(...)
  ── Error ('test-tests.R:106:5'): Testing everything ────────────────────────────
  <purrr_error_indexed/rlang_error/error/condition>
  Error in `map2(.x, vec_index(.x), .f, ...)`: i In index: 3.
  i With name: am.
  Caused by error in `as.data.frame.integer()`:
  ! row names contain missing values
  Backtrace:
       ▆
    1. ├─crosstable::crosstable(...) at test-tests.R:106:5
    2. │ └─crosstable:::cross_by(...)
    3. │   ├─... %>% list_rbind()
    4. │   └─purrr::imap(...)
    5. │     └─purrr::map2(.x, vec_index(.x), .f, ...)
    6. │       └─purrr:::map2_("list", .x, .y, .f, ..., .progress = .progress)
    7. │         ├─purrr:::with_indexed_errors(...)
    8. │         │ └─base::withCallingHandlers(...)
    9. │         ├─purrr:::call_with_cleanup(...)
   10. │         └─crosstable (local) .f(.x[[i]], .y[[i]], ...)
   11. │           └─crosstable:::cross_categorical(...)
   12. │             └─crosstable:::summarize_categorical_by(...)
   13. │               └─marginSums(nn3, margin = 2) %>% as.data.frame(responseName = "n_col_na")
   14. ├─purrr::list_rbind(.)
   15. │ └─purrr:::check_list_of_data_frames(x)
   16. │   └─vctrs::obj_check_list(x, call = error_call)
   17. ├─base::as.data.frame(., responseName = "n_col_na")
   18. ├─crosstable:::as.data.frame.table(., responseName = "n_col_na")
   19. │ └─base::as.data.frame.table(..., stringsAsFactors = FALSE)
   20. │   ├─base::eval(ex)
   21. │   │ └─base::eval(ex)
   22. │   └─base::data.frame(...)
   23. │     ├─base::as.data.frame(x[[i]], optional = TRUE)
   24. │     └─base::as.data.frame.integer(x[[i]], optional = TRUE)
   25. │       └─base::stop("row names contain missing values")
   26. └─base::.handleSimpleError(...)
   27.   └─purrr (local) h(simpleError(msg, call))
   28.     └─cli::cli_abort(...)
   29.       └─rlang::abort(...)
  ── Error ('test-selection.R:7:3'): crosstable whole table ──────────────────────
  <purrr_error_indexed/rlang_error/error/condition>
  Error in `map2(.x, vec_index(.x), .f, ...)`: i In index: 5.
  i With name: Species.
  Caused by error in `as.data.frame.integer()`:
  ! row names contain missing values
  Backtrace:
       ▆
    1. ├─crosstable:::expect_cross(...) at test-selection.R:7:3
    2. │ └─testthat::expect_s3_class(x, c("data.frame", "crosstable")) at ./helper-init_dataset.R:81:3
    3. │   └─testthat::quasi_label(enquo(object))
    4. │     └─rlang::eval_bare(expr, quo_get_env(quo))
    5. ├─crosstable::crosstable(iris2)
    6. │ └─crosstable:::cross_by(...)
    7. │   ├─... %>% list_rbind()
    8. │   └─purrr::imap(...)
    9. │     └─purrr::map2(.x, vec_index(.x), .f, ...)
   10. │       └─purrr:::map2_("list", .x, .y, .f, ..., .progress = .progress)
   11. │         ├─purrr:::with_indexed_errors(...)
   12. │         │ └─base::withCallingHandlers(...)
   13. │         ├─purrr:::call_with_cleanup(...)
   14. │         └─crosstable (local) .f(.x[[i]], .y[[i]], ...)
   15. │           └─crosstable:::cross_categorical(...)
   16. │             └─crosstable:::summarize_categorical_single(...)
   17. │               └─... %>% select(x = 1, n = 2)
   18. ├─purrr::list_rbind(.)
   19. │ └─purrr:::check_list_of_data_frames(x)
   20. │   └─vctrs::obj_check_list(x, call = error_call)
   21. ├─dplyr::select(., x = 1, n = 2)
   22. ├─base::as.data.frame(.)
   23. ├─crosstable:::as.data.frame.table(.)
   24. │ └─base::as.data.frame.table(..., stringsAsFactors = FALSE)
   25. │   ├─base::eval(ex)
   26. │   │ └─base::eval(ex)
   27. │   └─base::data.frame(...)
   28. │     ├─base::as.data.frame(x[[i]], optional = TRUE)
   29. │     └─base::as.data.frame.integer(x[[i]], optional = TRUE)
   30. │       └─base::stop("row names contain missing values")
   31. └─base::.handleSimpleError(...)
   32.   └─purrr (local) h(simpleError(msg, call))
   33.     └─cli::cli_abort(...)
   34.       └─rlang::abort(...)
  ── Error ('test-selection.R:80:3'): crosstable with tidyselect helpers ─────────
  <purrr_error_indexed/rlang_error/error/condition>
  Error in `map2(.x, vec_index(.x), .f, ...)`: i In index: 5.
  i With name: Species.
  Caused by error in `as.data.frame.integer()`:
  ! row names contain missing values
  Backtrace:
       ▆
    1. ├─crosstable:::expect_cross(...) at test-selection.R:80:3
    2. │ └─testthat::expect_s3_class(x, c("data.frame", "crosstable")) at ./helper-init_dataset.R:81:3
    3. │   └─testthat::quasi_label(enquo(object))
    4. │     └─rlang::eval_bare(expr, quo_get_env(quo))
    5. ├─crosstable::crosstable(iris2, everything())
    6. │ └─crosstable:::cross_by(...)
    7. │   ├─... %>% list_rbind()
    8. │   └─purrr::imap(...)
    9. │     └─purrr::map2(.x, vec_index(.x), .f, ...)
   10. │       └─purrr:::map2_("list", .x, .y, .f, ..., .progress = .progress)
   11. │         ├─purrr:::with_indexed_errors(...)
   12. │         │ └─base::withCallingHandlers(...)
   13. │         ├─purrr:::call_with_cleanup(...)
   14. │         └─crosstable (local) .f(.x[[i]], .y[[i]], ...)
   15. │           └─crosstable:::cross_categorical(...)
   16. │             └─crosstable:::summarize_categorical_single(...)
   17. │               └─... %>% select(x = 1, n = 2)
   18. ├─purrr::list_rbind(.)
   19. │ └─purrr:::check_list_of_data_frames(x)
   20. │   └─vctrs::obj_check_list(x, call = error_call)
   21. ├─dplyr::select(., x = 1, n = 2)
   22. ├─base::as.data.frame(.)
   23. ├─crosstable:::as.data.frame.table(.)
   24. │ └─base::as.data.frame.table(..., stringsAsFactors = FALSE)
   25. │   ├─base::eval(ex)
   26. │   │ └─base::eval(ex)
   27. │   └─base::data.frame(...)
   28. │     ├─base::as.data.frame(x[[i]], optional = TRUE)
   29. │     └─base::as.data.frame.integer(x[[i]], optional = TRUE)
   30. │       └─base::stop("row names contain missing values")
   31. └─base::.handleSimpleError(...)
   32.   └─purrr (local) h(simpleError(msg, call))
   33.     └─cli::cli_abort(...)
   34.       └─rlang::abort(...)
  ── Error ('test-selection.R:179:3'): crosstable with formula ───────────────────
  <purrr_error_indexed/rlang_error/error/condition>
  Error in `map2(.x, vec_index(.x), .f, ...)`: i In index: 5.
  i With name: Species.
  Caused by error in `as.data.frame.integer()`:
  ! row names contain missing values
  Backtrace:
       ▆
    1. ├─crosstable:::expect_cross(...) at test-selection.R:179:3
    2. │ └─testthat::expect_s3_class(x, c("data.frame", "crosstable")) at ./helper-init_dataset.R:81:3
    3. │   └─testthat::quasi_label(enquo(object))
    4. │     └─rlang::eval_bare(expr, quo_get_env(quo))
    5. ├─crosstable::crosstable(iris2, everything())
    6. │ └─crosstable:::cross_by(...)
    7. │   ├─... %>% list_rbind()
    8. │   └─purrr::imap(...)
    9. │     └─purrr::map2(.x, vec_index(.x), .f, ...)
   10. │       └─purrr:::map2_("list", .x, .y, .f, ..., .progress = .progress)
   11. │         ├─purrr:::with_indexed_errors(...)
   12. │         │ └─base::withCallingHandlers(...)
   13. │         ├─purrr:::call_with_cleanup(...)
   14. │         └─crosstable (local) .f(.x[[i]], .y[[i]], ...)
   15. │           └─crosstable:::cross_categorical(...)
   16. │             └─crosstable:::summarize_categorical_single(...)
   17. │               └─... %>% select(x = 1, n = 2)
   18. ├─purrr::list_rbind(.)
   19. │ └─purrr:::check_list_of_data_frames(x)
   20. │   └─vctrs::obj_check_list(x, call = error_call)
   21. ├─dplyr::select(., x = 1, n = 2)
   22. ├─base::as.data.frame(.)
   23. ├─crosstable:::as.data.frame.table(.)
   24. │ └─base::as.data.frame.table(..., stringsAsFactors = FALSE)
   25. │   ├─base::eval(ex)
   26. │   │ └─base::eval(ex)
   27. │   └─base::data.frame(...)
   28. │     ├─base::as.data.frame(x[[i]], optional = TRUE)
   29. │     └─base::as.data.frame.integer(x[[i]], optional = TRUE)
   30. │       └─base::stop("row names contain missing values")
   31. └─base::.handleSimpleError(...)
   32.   └─purrr (local) h(simpleError(msg, call))
   33.     └─cli::cli_abort(...)
   34.       └─rlang::abort(...)
  ── Error ('test-selection.R:214:3'): crosstable ultimate selection ─────────────
  <purrr_error_indexed/rlang_error/error/condition>
  Error in `map2(.x, vec_index(.x), .f, ...)`: i In index: 5.
  i With name: Species.
  Caused by error in `as.data.frame.integer()`:
  ! row names contain missing values
  Backtrace:
       ▆
    1. ├─crosstable:::expect_cross(...) at test-selection.R:214:3
    2. │ └─testthat::expect_s3_class(x, c("data.frame", "crosstable")) at ./helper-init_dataset.R:81:3
    3. │   └─testthat::quasi_label(enquo(object))
    4. │     └─rlang::eval_bare(expr, quo_get_env(quo))
    5. ├─crosstable::crosstable(iris2, everything())
    6. │ └─crosstable:::cross_by(...)
    7. │   ├─... %>% list_rbind()
    8. │   └─purrr::imap(...)
    9. │     └─purrr::map2(.x, vec_index(.x), .f, ...)
   10. │       └─purrr:::map2_("list", .x, .y, .f, ..., .progress = .progress)
   11. │         ├─purrr:::with_indexed_errors(...)
   12. │         │ └─base::withCallingHandlers(...)
   13. │         ├─purrr:::call_with_cleanup(...)
   14. │         └─crosstable (local) .f(.x[[i]], .y[[i]], ...)
   15. │           └─crosstable:::cross_categorical(...)
   16. │             └─crosstable:::summarize_categorical_single(...)
   17. │               └─... %>% select(x = 1, n = 2)
   18. ├─purrr::list_rbind(.)
   19. │ └─purrr:::check_list_of_data_frames(x)
   20. │   └─vctrs::obj_check_list(x, call = error_call)
   21. ├─dplyr::select(., x = 1, n = 2)
   22. ├─base::as.data.frame(.)
   23. ├─crosstable:::as.data.frame.table(.)
   24. │ └─base::as.data.frame.table(..., stringsAsFactors = FALSE)
   25. │   ├─base::eval(ex)
   26. │   │ └─base::eval(ex)
   27. │   └─base::data.frame(...)
   28. │     ├─base::as.data.frame(x[[i]], optional = TRUE)
   29. │     └─base::as.data.frame.integer(x[[i]], optional = TRUE)
   30. │       └─base::stop("row names contain missing values")
   31. └─base::.handleSimpleError(...)
   32.   └─purrr (local) h(simpleError(msg, call))
   33.     └─cli::cli_abort(...)
   34.       └─rlang::abort(...)
  ── Error ('test-selection.R:239:3'): crosstable limit tests: warnings ──────────
  <purrr_error_indexed/rlang_error/error/condition>
  Error in `map2(.x, vec_index(.x), .f, ...)`: i In index: 2.
  i With name: Species.
  Caused by error in `as.data.frame.integer()`:
  ! row names contain missing values
  Backtrace:
       ▆
    1. ├─testthat::expect_warning(crosstable(x, c(xx, Species)), class = "crosstable_wrong_col_class_warning") at test-selection.R:239:3
    2. │ └─testthat:::expect_condition_matching_(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─crosstable::crosstable(x, c(xx, Species))
    8. │ └─crosstable:::cross_by(...)
    9. │   ├─... %>% list_rbind()
   10. │   └─purrr::imap(...)
   11. │     └─purrr::map2(.x, vec_index(.x), .f, ...)
   12. │       └─purrr:::map2_("list", .x, .y, .f, ..., .progress = .progress)
   13. │         ├─purrr:::with_indexed_errors(...)
   14. │         │ └─base::withCallingHandlers(...)
   15. │         ├─purrr:::call_with_cleanup(...)
   16. │         └─crosstable (local) .f(.x[[i]], .y[[i]], ...)
   17. │           └─crosstable:::cross_categorical(...)
   18. │             └─crosstable:::summarize_categorical_single(...)
   19. │               └─... %>% select(x = 1, n = 2)
   20. ├─purrr::list_rbind(.)
   21. │ └─purrr:::check_list_of_data_frames(x)
   22. │   └─vctrs::obj_check_list(x, call = error_call)
   23. ├─dplyr::select(., x = 1, n = 2)
   24. ├─base::as.data.frame(.)
   25. ├─crosstable:::as.data.frame.table(.)
   26. │ └─base::as.data.frame.table(..., stringsAsFactors = FALSE)
   27. │   ├─base::eval(ex)
   28. │   │ └─base::eval(ex)
   29. │   └─base::data.frame(...)
   30. │     ├─base::as.data.frame(x[[i]], optional = TRUE)
   31. │     └─base::as.data.frame.integer(x[[i]], optional = TRUE)
   32. │       └─base::stop("row names contain missing values")
   33. └─base::.handleSimpleError(...)
   34.   └─purrr (local) h(simpleError(msg, call))
   35.     └─cli::cli_abort(...)
   36.       └─rlang::abort(...)
  ── Error ('test-selection.R:245:3'): crosstable limit tests: deprecated features ──
  <purrr_error_indexed/rlang_error/error/condition>
  Error in `map2(.x, vec_index(.x), .f, ...)`: i In index: 1.
  i With name: am.
  Caused by error in `as.data.frame.integer()`:
  ! row names contain missing values
  Backtrace:
       ▆
    1. ├─... %>% invisible()
    2. ├─crosstable::crosstable(...)
    3. │ └─crosstable:::cross_by(...)
    4. │   ├─... %>% list_rbind()
    5. │   └─purrr::imap(...)
    6. │     └─purrr::map2(.x, vec_index(.x), .f, ...)
    7. │       └─purrr:::map2_("list", .x, .y, .f, ..., .progress = .progress)
    8. │         ├─purrr:::with_indexed_errors(...)
    9. │         │ └─base::withCallingHandlers(...)
   10. │         ├─purrr:::call_with_cleanup(...)
   11. │         └─crosstable (local) .f(.x[[i]], .y[[i]], ...)
   12. │           └─crosstable:::cross_categorical(...)
   13. │             └─crosstable:::summarize_categorical_single(...)
   14. │               └─... %>% select(x = 1, n = 2)
   15. ├─purrr::list_rbind(.)
   16. │ └─purrr:::check_list_of_data_frames(x)
   17. │   └─vctrs::obj_check_list(x, call = error_call)
   18. ├─dplyr::select(., x = 1, n = 2)
   19. ├─base::as.data.frame(.)
   20. ├─crosstable:::as.data.frame.table(.)
   21. │ └─base::as.data.frame.table(..., stringsAsFactors = FALSE)
   22. │   ├─base::eval(ex)
   23. │   │ └─base::eval(ex)
   24. │   └─base::data.frame(...)
   25. │     ├─base::as.data.frame(x[[i]], optional = TRUE)
   26. │     └─base::as.data.frame.integer(x[[i]], optional = TRUE)
   27. │       └─base::stop("row names contain missing values")
   28. └─base::.handleSimpleError(...)
   29.   └─purrr (local) h(simpleError(msg, call))
   30.     └─cli::cli_abort(...)
   31.       └─rlang::abort(...)
  
  [ FAIL 34 | WARN 0 | SKIP 19 | PASS 223 ]
  Error:
  ! Test failures.
  Execution halted