Running 'testthat.R' [61s/46s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > test_check("crosstable")
  Loading required package: crosstable
  
  Attaching package: 'crosstable'
  
  The following object is masked from 'package:testthat':
  
      matches
  
  Starting 2 test processes
  == Skipped tests ===============================================================
  * On CRAN (7)
  
  == Failed tests ================================================================
  -- Error (test-2-selection.R:7:5): crosstable whole table ----------------------
  <rlang_error_data_pronoun_not_found/rlang_error/error/condition>
  Error: Column `x` not found in `.data`
  Backtrace:
       x
    1. +-crosstable:::expect_cross(...)
    2. | \-base::eval(expr, envir = caller_env()) testthat/helper-init_dataset.R:46:8
    3. +-crosstable::crosstable(iris2)
    4. | \-crosstable:::cross_by(...)
    5. |   \-purrr::imap_dfr(...)
    6. |     \-purrr::map2_dfr(.x, vec_index(.x), .f, ..., .id = .id)
    7. |       \-purrr::map2(.x, .y, .f, ...)
    8. |         \-crosstable:::.f(.x[[i]], .y[[i]], ...)
    9. |           \-crosstable:::cross_categorical(...)
   10. |             \-crosstable:::summarize_categorical_single(...)
   11. |               \-`%>%`(...)
   12. +-dplyr::select(., variable = .data$x, value = .data$value)
   13. +-dplyr:::select.data.frame(., variable = .data$x, value = .data$value)
   14. | \-tidyselect::eval_select(expr(c(...)), .data)
   15. |   \-tidyselect:::eval_select_impl(...)
   16. |     +-tidyselect:::with_subscript_errors(...)
   17. |     | +-base::tryCatch(...)
   18. |     | | \-base:::tryCatchList(expr, classes, parentenv, handlers)
   19. |     | |   \-base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
   20. |     | |     \-base:::doTryCatch(return(expr), name, parentenv, handler)
   21. |     | \-tidyselect:::instrument_base_errors(expr)
   22. |     |   \-base::withCallingHandlers(...)
   23. |     \-tidyselect:::vars_select_eval(...)
   24. |       \-tidyselect:::walk_data_tree(expr, data_mask, context_mask)
   25. |         \-tidyselect:::eval_c(expr, data_mask, context_mask)
   26. |           \-tidyselect:::reduce_sels(node, data_mask, context_mask, init = init)
   27. |             \-tidyselect:::walk_data_tree(new, data_mask, context_mask)
   28. |               \-base::eval(expr, data_mask)
   29. |                 \-base::eval(expr, data_mask)
   30. |                   +-x
   31. |                   \-rlang:::`$.rlang_data_pronoun`(.data, x)
   32. |                     \-rlang:::data_pronoun_get(x, nm)
   33. \-rlang:::abort_data_pronoun(x)
  -- Error (test-2-selection.R:85:5): crosstable with tidyselect helpers ---------
  <rlang_error_data_pronoun_not_found/rlang_error/error/condition>
  Error: Column `x` not found in `.data`
  Backtrace:
       x
    1. +-crosstable:::expect_cross(...)
    2. | \-base::eval(expr, envir = caller_env()) testthat/helper-init_dataset.R:46:8
    3. +-crosstable::crosstable(iris2, everything())
    4. | \-crosstable:::cross_by(...)
    5. |   \-purrr::imap_dfr(...)
    6. |     \-purrr::map2_dfr(.x, vec_index(.x), .f, ..., .id = .id)
    7. |       \-purrr::map2(.x, .y, .f, ...)
    8. |         \-crosstable:::.f(.x[[i]], .y[[i]], ...)
    9. |           \-crosstable:::cross_categorical(...)
   10. |             \-crosstable:::summarize_categorical_single(...)
   11. |               \-`%>%`(...)
   12. +-dplyr::select(., variable = .data$x, value = .data$value)
   13. +-dplyr:::select.data.frame(., variable = .data$x, value = .data$value)
   14. | \-tidyselect::eval_select(expr(c(...)), .data)
   15. |   \-tidyselect:::eval_select_impl(...)
   16. |     +-tidyselect:::with_subscript_errors(...)
   17. |     | +-base::tryCatch(...)
   18. |     | | \-base:::tryCatchList(expr, classes, parentenv, handlers)
   19. |     | |   \-base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
   20. |     | |     \-base:::doTryCatch(return(expr), name, parentenv, handler)
   21. |     | \-tidyselect:::instrument_base_errors(expr)
   22. |     |   \-base::withCallingHandlers(...)
   23. |     \-tidyselect:::vars_select_eval(...)
   24. |       \-tidyselect:::walk_data_tree(expr, data_mask, context_mask)
   25. |         \-tidyselect:::eval_c(expr, data_mask, context_mask)
   26. |           \-tidyselect:::reduce_sels(node, data_mask, context_mask, init = init)
   27. |             \-tidyselect:::walk_data_tree(new, data_mask, context_mask)
   28. |               \-base::eval(expr, data_mask)
   29. |                 \-base::eval(expr, data_mask)
   30. |                   +-x
   31. |                   \-rlang:::`$.rlang_data_pronoun`(.data, x)
   32. |                     \-rlang:::data_pronoun_get(x, nm)
   33. \-rlang:::abort_data_pronoun(x)
  -- Error (test-2-selection.R:184:5): crosstable with formula -------------------
  <rlang_error_data_pronoun_not_found/rlang_error/error/condition>
  Error: Column `x` not found in `.data`
  Backtrace:
       x
    1. +-crosstable:::expect_cross(...)
    2. | \-base::eval(expr, envir = caller_env()) testthat/helper-init_dataset.R:46:8
    3. +-crosstable::crosstable(iris2, everything())
    4. | \-crosstable:::cross_by(...)
    5. |   \-purrr::imap_dfr(...)
    6. |     \-purrr::map2_dfr(.x, vec_index(.x), .f, ..., .id = .id)
    7. |       \-purrr::map2(.x, .y, .f, ...)
    8. |         \-crosstable:::.f(.x[[i]], .y[[i]], ...)
    9. |           \-crosstable:::cross_categorical(...)
   10. |             \-crosstable:::summarize_categorical_single(...)
   11. |               \-`%>%`(...)
   12. +-dplyr::select(., variable = .data$x, value = .data$value)
   13. +-dplyr:::select.data.frame(., variable = .data$x, value = .data$value)
   14. | \-tidyselect::eval_select(expr(c(...)), .data)
   15. |   \-tidyselect:::eval_select_impl(...)
   16. |     +-tidyselect:::with_subscript_errors(...)
   17. |     | +-base::tryCatch(...)
   18. |     | | \-base:::tryCatchList(expr, classes, parentenv, handlers)
   19. |     | |   \-base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
   20. |     | |     \-base:::doTryCatch(return(expr), name, parentenv, handler)
   21. |     | \-tidyselect:::instrument_base_errors(expr)
   22. |     |   \-base::withCallingHandlers(...)
   23. |     \-tidyselect:::vars_select_eval(...)
   24. |       \-tidyselect:::walk_data_tree(expr, data_mask, context_mask)
   25. |         \-tidyselect:::eval_c(expr, data_mask, context_mask)
   26. |           \-tidyselect:::reduce_sels(node, data_mask, context_mask, init = init)
   27. |             \-tidyselect:::walk_data_tree(new, data_mask, context_mask)
   28. |               \-base::eval(expr, data_mask)
   29. |                 \-base::eval(expr, data_mask)
   30. |                   +-x
   31. |                   \-rlang:::`$.rlang_data_pronoun`(.data, x)
   32. |                     \-rlang:::data_pronoun_get(x, nm)
   33. \-rlang:::abort_data_pronoun(x)
  -- Error (test-2-selection.R:202:5): crosstable ultimate selection -------------
  <rlang_error_data_pronoun_not_found/rlang_error/error/condition>
  Error: Column `x` not found in `.data`
  Backtrace:
       x
    1. +-crosstable:::expect_cross(...)
    2. | \-base::eval(expr, envir = caller_env()) testthat/helper-init_dataset.R:46:8
    3. +-crosstable::crosstable(iris2, everything())
    4. | \-crosstable:::cross_by(...)
    5. |   \-purrr::imap_dfr(...)
    6. |     \-purrr::map2_dfr(.x, vec_index(.x), .f, ..., .id = .id)
    7. |       \-purrr::map2(.x, .y, .f, ...)
    8. |         \-crosstable:::.f(.x[[i]], .y[[i]], ...)
    9. |           \-crosstable:::cross_categorical(...)
   10. |             \-crosstable:::summarize_categorical_single(...)
   11. |               \-`%>%`(...)
   12. +-dplyr::select(., variable = .data$x, value = .data$value)
   13. +-dplyr:::select.data.frame(., variable = .data$x, value = .data$value)
   14. | \-tidyselect::eval_select(expr(c(...)), .data)
   15. |   \-tidyselect:::eval_select_impl(...)
   16. |     +-tidyselect:::with_subscript_errors(...)
   17. |     | +-base::tryCatch(...)
   18. |     | | \-base:::tryCatchList(expr, classes, parentenv, handlers)
   19. |     | |   \-base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
   20. |     | |     \-base:::doTryCatch(return(expr), name, parentenv, handler)
   21. |     | \-tidyselect:::instrument_base_errors(expr)
   22. |     |   \-base::withCallingHandlers(...)
   23. |     \-tidyselect:::vars_select_eval(...)
   24. |       \-tidyselect:::walk_data_tree(expr, data_mask, context_mask)
   25. |         \-tidyselect:::eval_c(expr, data_mask, context_mask)
   26. |           \-tidyselect:::reduce_sels(node, data_mask, context_mask, init = init)
   27. |             \-tidyselect:::walk_data_tree(new, data_mask, context_mask)
   28. |               \-base::eval(expr, data_mask)
   29. |                 \-base::eval(expr, data_mask)
   30. |                   +-x
   31. |                   \-rlang:::`$.rlang_data_pronoun`(.data, x)
   32. |                     \-rlang:::data_pronoun_get(x, nm)
   33. \-rlang:::abort_data_pronoun(x)
  -- Error (test-2-selection.R:227:5): crosstable limit tests: warnings ----------
  <rlang_error_data_pronoun_not_found/rlang_error/error/condition>
  Error: Column `x` not found in `.data`
  Backtrace:
       x
    1. +-testthat::expect_warning(crosstable(x, c(xx, Species)), class = "crosstable_wrong_col_class_warning")
    2. | \-testthat:::expect_condition_matching(...)
    3. |   \-testthat:::quasi_capture(...)
    4. |     +-testthat:::.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. |   \-purrr::imap_dfr(...)
   10. |     \-purrr::map2_dfr(.x, vec_index(.x), .f, ..., .id = .id)
   11. |       \-purrr::map2(.x, .y, .f, ...)
   12. |         \-crosstable:::.f(.x[[i]], .y[[i]], ...)
   13. |           \-crosstable:::cross_categorical(...)
   14. |             \-crosstable:::summarize_categorical_single(...)
   15. |               \-`%>%`(...)
   16. +-dplyr::select(., variable = .data$x, value = .data$value)
   17. +-dplyr:::select.data.frame(., variable = .data$x, value = .data$value)
   18. | \-tidyselect::eval_select(expr(c(...)), .data)
   19. |   \-tidyselect:::eval_select_impl(...)
   20. |     +-tidyselect:::with_subscript_errors(...)
   21. |     | +-base::tryCatch(...)
   22. |     | | \-base:::tryCatchList(expr, classes, parentenv, handlers)
   23. |     | |   \-base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
   24. |     | |     \-base:::doTryCatch(return(expr), name, parentenv, handler)
   25. |     | \-tidyselect:::instrument_base_errors(expr)
   26. |     |   \-base::withCallingHandlers(...)
   27. |     \-tidyselect:::vars_select_eval(...)
   28. |       \-tidyselect:::walk_data_tree(expr, data_mask, context_mask)
   29. |         \-tidyselect:::eval_c(expr, data_mask, context_mask)
   30. |           \-tidyselect:::reduce_sels(node, data_mask, context_mask, init = init)
   31. |             \-tidyselect:::walk_data_tree(new, data_mask, context_mask)
   32. |               \-base::eval(expr, data_mask)
   33. |                 \-base::eval(expr, data_mask)
   34. |                   +-x
   35. |                   \-rlang:::`$.rlang_data_pronoun`(.data, x)
   36. |                     \-rlang:::data_pronoun_get(x, nm)
   37. \-rlang:::abort_data_pronoun(x)
  -- Error (test-4-officer.R:50:1): (code run outside of `test_that()`) ----------
  <rlang_error_data_pronoun_not_found/rlang_error/error/condition>
  Error: Column `x` not found in `.data`
  Backtrace:
       x
    1. +-base::suppressWarnings(...)
    2. | \-base::withCallingHandlers(...)
    3. +-crosstable::crosstable(esoph, test = TRUE)
    4. | \-crosstable:::cross_by(...)
    5. |   \-purrr::imap_dfr(...)
    6. |     \-purrr::map2_dfr(.x, vec_index(.x), .f, ..., .id = .id)
    7. |       \-purrr::map2(.x, .y, .f, ...)
    8. |         \-crosstable:::.f(.x[[i]], .y[[i]], ...)
    9. |           \-crosstable:::cross_categorical(...)
   10. |             \-crosstable:::summarize_categorical_single(...)
   11. |               \-`%>%`(...)
   12. +-dplyr::select(., variable = .data$x, value = .data$value)
   13. +-dplyr:::select.data.frame(., variable = .data$x, value = .data$value)
   14. | \-tidyselect::eval_select(expr(c(...)), .data)
   15. |   \-tidyselect:::eval_select_impl(...)
   16. |     +-tidyselect:::with_subscript_errors(...)
   17. |     | +-base::tryCatch(...)
   18. |     | | \-base:::tryCatchList(expr, classes, parentenv, handlers)
   19. |     | |   \-base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
   20. |     | |     \-base:::doTryCatch(return(expr), name, parentenv, handler)
   21. |     | \-tidyselect:::instrument_base_errors(expr)
   22. |     |   \-base::withCallingHandlers(...)
   23. |     \-tidyselect:::vars_select_eval(...)
   24. |       \-tidyselect:::walk_data_tree(expr, data_mask, context_mask)
   25. |         \-tidyselect:::eval_c(expr, data_mask, context_mask)
   26. |           \-tidyselect:::reduce_sels(node, data_mask, context_mask, init = init)
   27. |             \-tidyselect:::walk_data_tree(new, data_mask, context_mask)
   28. |               \-base::eval(expr, data_mask)
   29. |                 \-base::eval(expr, data_mask)
   30. |                   +-x
   31. |                   \-rlang:::`$.rlang_data_pronoun`(.data, x)
   32. |                     \-rlang:::data_pronoun_get(x, nm)
   33. \-rlang:::abort_data_pronoun(x)
  -- Error (test-1-crosstable.R:63:3): numeric+factor+surv by nothing ------------
  <rlang_error_data_pronoun_not_found/rlang_error/error/condition>
  Error: Column `x` not found in `.data`
  Backtrace:
       x
    1. +-crosstable::crosstable(mtcars3, c(am, mpg, cyl, surv))
    2. | \-crosstable:::cross_by(...)
    3. |   \-purrr::imap_dfr(...)
    4. |     \-purrr::map2_dfr(.x, vec_index(.x), .f, ..., .id = .id)
    5. |       \-purrr::map2(.x, .y, .f, ...)
    6. |         \-crosstable:::.f(.x[[i]], .y[[i]], ...)
    7. |           \-crosstable:::cross_categorical(...)
    8. |             \-crosstable:::summarize_categorical_single(...)
    9. |               \-`%>%`(...)
   10. +-dplyr::select(., variable = .data$x, value = .data$value)
   11. +-dplyr:::select.data.frame(., variable = .data$x, value = .data$value)
   12. | \-tidyselect::eval_select(expr(c(...)), .data)
   13. |   \-tidyselect:::eval_select_impl(...)
   14. |     +-tidyselect:::with_subscript_errors(...)
   15. |     | +-base::tryCatch(...)
   16. |     | | \-base:::tryCatchList(expr, classes, parentenv, handlers)
   17. |     | |   \-base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
   18. |     | |     \-base:::doTryCatch(return(expr), name, parentenv, handler)
   19. |     | \-tidyselect:::instrument_base_errors(expr)
   20. |     |   \-base::withCallingHandlers(...)
   21. |     \-tidyselect:::vars_select_eval(...)
   22. |       \-tidyselect:::walk_data_tree(expr, data_mask, context_mask)
   23. |         \-tidyselect:::eval_c(expr, data_mask, context_mask)
   24. |           \-tidyselect:::reduce_sels(node, data_mask, context_mask, init = init)
   25. |             \-tidyselect:::walk_data_tree(new, data_mask, context_mask)
   26. |               \-base::eval(expr, data_mask)
   27. |                 \-base::eval(expr, data_mask)
   28. |                   +-x
   29. |                   \-rlang:::`$.rlang_data_pronoun`(.data, x)
   30. |                     \-rlang:::data_pronoun_get(x, nm)
   31. \-rlang:::abort_data_pronoun(x)
  -- Error (test-1-crosstable.R:273:3): Multiple functions -----------------------
  Error: `object` and `expected` must both be vectors
  Backtrace:
      x
   1. \-testthat::expect_setequal(...)
  -- Error (test-1-crosstable.R:414:3): Testing everything -----------------------
  Error in `UseMethod("as_flextable")`: no applicable method for 'as_flextable' applied to an object of class "c('crosstable_effect_warning', 'warning', 'condition')"
  Backtrace:
      x
   1. \-flextable::as_flextable(x)
  
  [ FAIL 9 | WARN 0 | SKIP 7 | PASS 294 ]
  Error: Test failures
  Execution halted