Running ‘testthat.R’ [10m/23m]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > test_check("cardx", stop_on_warning = TRUE)
  Loading required package: cardx
  Starting 2 test processes.
  > test-ard_categorical_ci.data.frame.R: 5 missing observations in the "am" column have been removed.
  > test-ard_effectsize_cohens_d.R: For paired samples, 'repeated_measures_d()' provides more options.
  > test-ard_effectsize_hedges_g.R: For paired samples, 'repeated_measures_d()' provides more options.
  > test-ard_stats_oneway_test.R: Multiple parameters; naming those columns num.df and den.df.
  > test-ard_summary.survey.design.R: Expecting a row with `stat_name = 'method'`, but it is not present.
  > test-ard_summary.survey.design.R: Expecting a row with `stat_name = 'method'`, but it is not present.
  Saving _problems/test-ard_tabulate.survey.design-241.R
  Saving _problems/test-ard_tabulate.survey.design-275.R
  Saving _problems/test-ard_tabulate.survey.design-693.R
  Saving _problems/test-ard_tabulate.survey.design-990.R
  Saving _problems/test-ard_tabulate.survey.design-1111.R
  > test-ard_tabulate_max.R: `AESEV`: "MILD" < "MODERATE" < "SEVERE"
  Saving _problems/test-ard_tabulate_max-42.R
  Saving _problems/test-ard_tabulate_max-112.R
  Saving _problems/test-ard_tabulate_max-134.R
  Saving _problems/test-ard_tabulate_value.survey.design-582.R
  [ FAIL 9 | WARN 0 | SKIP 62 | PASS 593 ]
  
  ══ Skipped tests (62) ══════════════════════════════════════════════════════════
  • On CRAN (62): 'test-ard_aod_wald_test.R:3:1',
    'test-ard_attributes.survey.design.R:3:1', 'test-ard_car_anova.R:3:1',
    'test-ard_car_anova.R:15:1', 'test-ard_car_vif.R:3:1',
    'test-ard_car_vif.R:28:1', 'test-ard_categorical_ci.survey.design.R:6:1',
    'test-ard_continuous_ci.survey.design.R:6:1',
    'test-ard_continuous_ci.survey.design.R:193:1',
    'test-ard_effectsize_cohens_d.R:3:1', 'test-ard_effectsize_hedges_g.R:3:1',
    'test-ard_emmeans_contrast.R:3:1', 'test-ard_emmeans_contrast.R:100:1',
    'test-ard_incidence_rate.R:7:1', 'test-ard_incidence_rate.R:43:1',
    'test-ard_incidence_rate.R:66:1', 'test-ard_emmeans_emmeans.R:3:1',
    'test-ard_emmeans_emmeans.R:93:1', 'test-ard_proportion_ci.R:62:1',
    'test-ard_proportion_ci.R:112:1', 'test-ard_regression_basic.R:3:1',
    'test-ard_stats_aov.R:3:1', 'test-ard_regression.R:3:1',
    'test-ard_regression.R:40:1', 'test-ard_stats_kruskal_test.R:3:1',
    'test-ard_stats_mantelhaen_test.R:3:1', 'test-ard_stats_oneway_test.R:3:1',
    'test-ard_stats_mood_test.R:3:1', 'test-ard_stats_poisson_test.R:73:1',
    'test-ard_survey_svychisq.R:3:1', 'test-ard_survey_svyranktest.R:3:1',
    'test-ard_survival_survfit.R:3:1', 'test-ard_survival_survfit.R:16:1',
    'test-ard_survival_survfit.R:29:1', 'test-ard_survival_survfit.R:42:1',
    'test-ard_survival_survfit.R:64:1', 'test-ard_survival_survfit.R:90:1',
    'test-ard_survival_survfit.R:120:1', 'test-ard_survival_survfit.R:191:1',
    'test-ard_survival_survfit.R:201:1', 'test-ard_survival_survfit.R:221:1',
    'test-ard_survival_survfit.R:231:1', 'test-ard_survival_survfit_diff.R:36:1',
    'test-ard_tabulate.survey.design.R:421:1',
    'test-ard_tabulate.survey.design.R:1176:1',
    'test-ard_tabulate.survey.design.R:1410:1',
    'test-ard_tabulate_abnormal.R:5:1', 'test-ard_tabulate_abnormal.R:41:1',
    'test-ard_tabulate_max.R:60:1', 'test-ard_tabulate_max.R:75:1',
    'test-ard_tabulate_max.R:210:1', 'test-ard_tabulate_max.R:236:1',
    'test-ard_tabulate_max.R:258:1',
    'test-ard_tabulate_value.survey.design.R:736:1',
    'test-ard_total_n.survey.design.R:3:1', 'test-construction_helpers.R:3:1',
    'test-construction_helpers.R:103:1', 'test-proportion_ci.R:3:1',
    'test-proportion_ci.R:122:1', 'test-ard_summary.survey.design.R:3:1',
    'test-ard_summary.survey.design.R:318:1',
    'test-ard_summary.survey.design.R:334:1'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure ('test-ard_tabulate.survey.design.R:233:3'): ard_tabulate.survey.design() works ──
  Expected `... <- NULL` not to throw any errors.
  Actually got a <simpleError> with message:
    row names contain missing values
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test-ard_tabulate.survey.design.R:233: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. ├─cards::ard_tabulate(svy_titanic, variables = c(Class, Age), denominator = "row")
    8. └─cardx:::ard_tabulate.survey.design(...)
    9.   ├─dplyr::mutate(...)
   10.   ├─dplyr::select(...)
   11.   ├─dplyr::mutate(...)
   12.   ├─cards::ard_tabulate(...)
   13.   └─cards:::ard_tabulate.data.frame(...)
   14.     └─cards:::.calculate_tabulation_statistics(...)
   15.       └─cards:::.process_denominator(...)
   16.         ├─stats::setNames(...)
   17.         └─base::lapply(...)
   18.           └─cards (local) FUN(X[[i]], ...)
   19.             ├─dplyr::summarise(...)
   20.             ├─tidyr::drop_na(...)
   21.             └─cards:::.table_as_df(...)
   22.               ├─dplyr::as_tibble(...)
   23.               └─tibble:::as_tibble.table(...)
   24.                 ├─base::as.data.frame(x, stringsAsFactors = FALSE)
   25.                 └─base::as.data.frame.table(x, 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)
  ── Error ('test-ard_tabulate.survey.design.R:271:3'): ard_tabulate.survey.design() works ──
  Error in `as.data.frame.integer(x[[i]], optional = TRUE)`: row names contain missing values
  Backtrace:
       ▆
    1. ├─testthat::expect_equal(...) at test-ard_tabulate.survey.design.R:271:3
    2. │ └─testthat::quasi_label(enquo(expected), expected.label)
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. ├─base::unlist(...)
    5. ├─cards::get_ard_statistics(...)
    6. │ └─dplyr::filter(x, ...)
    7. ├─cards::ard_tabulate(...)
    8. └─cards:::ard_tabulate.data.frame(...)
    9.   └─cards:::.calculate_tabulation_statistics(...)
   10.     └─cards:::.process_denominator(...)
   11.       ├─stats::setNames(...)
   12.       └─base::lapply(...)
   13.         └─cards (local) FUN(X[[i]], ...)
   14.           ├─dplyr::summarise(...)
   15.           ├─tidyr::drop_na(...)
   16.           └─cards:::.table_as_df(...)
   17.             ├─dplyr::as_tibble(...)
   18.             └─tibble:::as_tibble.table(...)
   19.               ├─base::as.data.frame(x, stringsAsFactors = FALSE)
   20.               └─base::as.data.frame.table(x, 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)
  ── Failure ('test-ard_tabulate.survey.design.R:685:3'): ard_tabulate.survey.design() works for unobserved factor levels ──
  Expected `... <- NULL` not to throw any errors.
  Actually got a <simpleError> with message:
    row names contain missing values
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test-ard_tabulate.survey.design.R:685: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. ├─cards::ard_tabulate(svy_titanic, variables = c(Class, Age), denominator = "row")
    8. └─cardx:::ard_tabulate.survey.design(...)
    9.   ├─dplyr::mutate(...)
   10.   ├─dplyr::select(...)
   11.   ├─dplyr::mutate(...)
   12.   ├─cards::ard_tabulate(...)
   13.   └─cards:::ard_tabulate.data.frame(...)
   14.     └─cards:::.calculate_tabulation_statistics(...)
   15.       └─cards:::.process_denominator(...)
   16.         ├─stats::setNames(...)
   17.         └─base::lapply(...)
   18.           └─cards (local) FUN(X[[i]], ...)
   19.             ├─dplyr::summarise(...)
   20.             ├─tidyr::drop_na(...)
   21.             └─cards:::.table_as_df(...)
   22.               ├─dplyr::as_tibble(...)
   23.               └─tibble:::as_tibble.table(...)
   24.                 ├─base::as.data.frame(x, stringsAsFactors = FALSE)
   25.                 └─base::as.data.frame.table(x, 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)
  ── Failure ('test-ard_tabulate.survey.design.R:982:3'): ard_tabulate.survey.design() works for unobserved logical levels ──
  Expected `... <- NULL` not to throw any errors.
  Actually got a <simpleError> with message:
    row names contain missing values
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test-ard_tabulate.survey.design.R:982: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. ├─cards::ard_tabulate(svy_titanic, variables = c(Class, Age), denominator = "row")
    8. └─cardx:::ard_tabulate.survey.design(...)
    9.   ├─dplyr::mutate(...)
   10.   ├─dplyr::select(...)
   11.   ├─dplyr::mutate(...)
   12.   ├─cards::ard_tabulate(...)
   13.   └─cards:::ard_tabulate.data.frame(...)
   14.     └─cards:::.calculate_tabulation_statistics(...)
   15.       └─cards:::.process_denominator(...)
   16.         ├─stats::setNames(...)
   17.         └─base::lapply(...)
   18.           └─cards (local) FUN(X[[i]], ...)
   19.             ├─dplyr::summarise(...)
   20.             ├─tidyr::drop_na(...)
   21.             └─cards:::.table_as_df(...)
   22.               ├─dplyr::as_tibble(...)
   23.               └─tibble:::as_tibble.table(...)
   24.                 ├─base::as.data.frame(x, stringsAsFactors = FALSE)
   25.                 └─base::as.data.frame.table(x, 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)
  ── Failure ('test-ard_tabulate.survey.design.R:1103:3'): ard_tabulate.survey.design() works with variables with only 1 level ──
  Expected `... <- NULL` not to throw any errors.
  Actually got a <simpleError> with message:
    row names contain missing values
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test-ard_tabulate.survey.design.R:1103: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. ├─cards::ard_tabulate(svy_titanic, variables = c(Class, Age), denominator = "row")
    8. └─cardx:::ard_tabulate.survey.design(...)
    9.   ├─dplyr::mutate(...)
   10.   ├─dplyr::select(...)
   11.   ├─dplyr::mutate(...)
   12.   ├─cards::ard_tabulate(...)
   13.   └─cards:::ard_tabulate.data.frame(...)
   14.     └─cards:::.calculate_tabulation_statistics(...)
   15.       └─cards:::.process_denominator(...)
   16.         ├─stats::setNames(...)
   17.         └─base::lapply(...)
   18.           └─cards (local) FUN(X[[i]], ...)
   19.             ├─dplyr::summarise(...)
   20.             ├─tidyr::drop_na(...)
   21.             └─cards:::.table_as_df(...)
   22.               ├─dplyr::as_tibble(...)
   23.               └─tibble:::as_tibble.table(...)
   24.                 ├─base::as.data.frame(x, stringsAsFactors = FALSE)
   25.                 └─base::as.data.frame.table(x, 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)
  ── Error ('test-ard_tabulate_max.R:34:3'): ard_tabulate_max() works with default settings ──
  Error in `as.data.frame.integer(x[[i]], optional = TRUE)`: row names contain missing values
  Backtrace:
       ▆
    1. ├─base::print(...)
    2. └─cardx::ard_tabulate_max(...)
    3.   └─base::lapply(...)
    4.     └─cardx (local) FUN(X[[i]], ...)
    5.       ├─cards::ard_categorical(...)
    6.       └─cards:::ard_categorical.data.frame(...)
    7.         ├─dplyr::mutate(ard_tabulate(data = data, ...), context = "categorical")
    8.         ├─cards::ard_tabulate(data = data, ...)
    9.         └─cards:::ard_tabulate.data.frame(data = data, ...)
   10.           └─cards:::.calculate_tabulation_statistics(...)
   11.             └─cards:::.process_denominator(...)
   12.               ├─rlang::rep_named(...)
   13.               │ └─rlang::set_names(rep_len(x, length(names)), names)
   14.               ├─tidyr::drop_na(...)
   15.               └─cards:::.table_as_df(...)
   16.                 ├─dplyr::as_tibble(...)
   17.                 └─tibble:::as_tibble.table(...)
   18.                   ├─base::as.data.frame(x, stringsAsFactors = FALSE)
   19.                   └─base::as.data.frame.table(x, 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)
  ── Error ('test-ard_tabulate_max.R:103:3'): ard_tabulate_max(quiet) works ──────
  Error in `as.data.frame.integer(x[[i]], optional = TRUE)`: row names contain missing values
  Backtrace:
       ▆
    1. ├─testthat::expect_silent(...) at test-ard_tabulate_max.R:103:3
    2. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ ├─withr::with_output_sink(...)
    5. │   │ │ └─base::force(code)
    6. │   │ ├─base::withCallingHandlers(...)
    7. │   │ └─base::withVisible(code)
    8. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    9. └─cardx::ard_tabulate_max(...)
   10.   └─base::lapply(...)
   11.     └─cardx (local) FUN(X[[i]], ...)
   12.       ├─cards::ard_categorical(...)
   13.       └─cards:::ard_categorical.data.frame(...)
   14.         ├─dplyr::mutate(ard_tabulate(data = data, ...), context = "categorical")
   15.         ├─cards::ard_tabulate(data = data, ...)
   16.         └─cards:::ard_tabulate.data.frame(data = data, ...)
   17.           └─cards:::.calculate_tabulation_statistics(...)
   18.             └─cards:::.process_denominator(...)
   19.               ├─rlang::rep_named(...)
   20.               │ └─rlang::set_names(rep_len(x, length(names)), names)
   21.               ├─tidyr::drop_na(...)
   22.               └─cards:::.table_as_df(...)
   23.                 ├─dplyr::as_tibble(...)
   24.                 └─tibble:::as_tibble.table(...)
   25.                   ├─base::as.data.frame(x, stringsAsFactors = FALSE)
   26.                   └─base::as.data.frame.table(x, 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)
  ── Error ('test-ard_tabulate_max.R:125:3'): ard_tabulate_max() works with pre-ordered factor variables ──
  Error in `as.data.frame.integer(x[[i]], optional = TRUE)`: row names contain missing values
  Backtrace:
       ▆
    1. ├─testthat::expect_message(...) at test-ard_tabulate_max.R:125: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. └─cardx::ard_tabulate_max(...)
    8.   └─base::lapply(...)
    9.     └─cardx (local) FUN(X[[i]], ...)
   10.       ├─cards::ard_categorical(...)
   11.       └─cards:::ard_categorical.data.frame(...)
   12.         ├─dplyr::mutate(ard_tabulate(data = data, ...), context = "categorical")
   13.         ├─cards::ard_tabulate(data = data, ...)
   14.         └─cards:::ard_tabulate.data.frame(data = data, ...)
   15.           └─cards:::.calculate_tabulation_statistics(...)
   16.             └─cards:::.process_denominator(...)
   17.               ├─rlang::rep_named(...)
   18.               │ └─rlang::set_names(rep_len(x, length(names)), names)
   19.               ├─tidyr::drop_na(...)
   20.               └─cards:::.table_as_df(...)
   21.                 ├─dplyr::as_tibble(...)
   22.                 └─tibble:::as_tibble.table(...)
   23.                   ├─base::as.data.frame(x, stringsAsFactors = FALSE)
   24.                   └─base::as.data.frame.table(x, 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)
  ── Failure ('test-ard_tabulate_value.survey.design.R:573:3'): ard_tabulate_value.survey.design() works ──
  Expected `... <- NULL` not to throw any errors.
  Actually got a <simpleError> with message:
    row names contain missing values
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test-ard_tabulate_value.survey.design.R:573: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. ├─cards::ard_tabulate_value(...)
    8. └─cardx:::ard_tabulate_value.survey.design(...)
    9.   ├─dplyr::mutate(...)
   10.   ├─dplyr::filter(...)
   11.   ├─cards::ard_tabulate(...)
   12.   └─cardx:::ard_tabulate.survey.design(...)
   13.     ├─dplyr::mutate(...)
   14.     ├─dplyr::select(...)
   15.     ├─dplyr::mutate(...)
   16.     ├─cards::ard_tabulate(...)
   17.     └─cards:::ard_tabulate.data.frame(...)
   18.       └─cards:::.calculate_tabulation_statistics(...)
   19.         └─cards:::.process_denominator(...)
   20.           ├─stats::setNames(...)
   21.           └─base::lapply(...)
   22.             └─cards (local) FUN(X[[i]], ...)
   23.               ├─dplyr::summarise(...)
   24.               ├─tidyr::drop_na(...)
   25.               └─cards:::.table_as_df(...)
   26.                 ├─dplyr::as_tibble(...)
   27.                 └─tibble:::as_tibble.table(...)
   28.                   ├─base::as.data.frame(x, stringsAsFactors = FALSE)
   29.                   └─base::as.data.frame.table(x, stringsAsFactors = FALSE)
   30.                     ├─base::eval(ex)
   31.                     │ └─base::eval(ex)
   32.                     └─base::data.frame(...)
   33.                       ├─base::as.data.frame(x[[i]], optional = TRUE)
   34.                       └─base::as.data.frame.integer(x[[i]], optional = TRUE)
  
  [ FAIL 9 | WARN 0 | SKIP 62 | PASS 593 ]
  Error:
  ! Test failures.
  Execution halted