Running ‘testthat.R’ [4s/5s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/tests.html
  > # * https://testthat.r-lib.org/reference/test_package.html#special-files
  > 
  > library(testthat)
  > library(panelsummary)
  > 
  > test_check("panelsummary")
  Saving _problems/test-add_panels-17.R
  Saving _problems/test-add_panels-34.R
  NOTE: 0/2 fixed-effect singletons were removed (2 observations).
  NOTE: 0/2 fixed-effect singletons were removed (2 observations).
  Saving _problems/test-add_panels-55.R
  NOTE: 0/2 fixed-effect singletons were removed (2 observations).
  Saving _problems/test-helper_functions-31.R
  Saving _problems/test-panelsummary_raw-6.R
  Saving _problems/test-panelsummary_raw-14.R
  [ FAIL 6 | WARN 0 | SKIP 13 | PASS 7 ]
  
  ══ Skipped tests (13) ══════════════════════════════════════════════════════════
  • On CRAN (13): 'test-create_means.R:26:3', 'test-create_means.R:36:3',
    'test-create_means.R:46:3', 'test-create_means.R:59:3',
    'test-create_means.R:69:3', 'test-helper_functions.R:4:3',
    'test-helper_functions.R:41:3', 'test-panelsummary.R:4:3',
    'test-panelsummary.R:28:3', 'test-panelsummary.R:52:3',
    'test-panelsummary.R:75:3', 'test-panelsummary.R:98:3',
    'test-panelsummary_raw.R:20:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure ('test-add_panels.R:13:3'): add rows works with bold argument ───────
  Expected `panelsummary(...)` not to throw any errors.
  Actually got a <simpleError> with message:
    a character vector argument expected
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test-add_panels.R:13: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. └─panelsummary::panelsummary(...)
    8.   └─base::lapply(...)
    9.     └─panelsummary (local) FUN(X[[i]], ...)
   10.       └─modelsummary::modelsummary(...)
   11.         └─modelsummary:::factory(...)
   12.           └─modelsummary (local) factory_fun(...)
   13.             ├─base::isTRUE(tools::file_ext(output_file) == "csv")
   14.             └─tools::file_ext(output_file)
   15.               ├─base::ifelse(...)
   16.               ├─base::grepl("^(.*[^.]+.*)[.]([[:alnum:]]+)$", basename(x))
   17.               │ └─base::is.factor(x)
   18.               └─base::basename(x)
  ── Failure ('test-add_panels.R:30:3'): add rows works with italic argument ─────
  Expected `panelsummary(...)` not to throw any errors.
  Actually got a <simpleError> with message:
    a character vector argument expected
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test-add_panels.R:30: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. └─panelsummary::panelsummary(...)
    8.   └─base::lapply(...)
    9.     └─panelsummary (local) FUN(X[[i]], ...)
   10.       └─modelsummary::modelsummary(...)
   11.         └─modelsummary:::factory(...)
   12.           └─modelsummary (local) factory_fun(...)
   13.             ├─base::isTRUE(tools::file_ext(output_file) == "csv")
   14.             └─tools::file_ext(output_file)
   15.               ├─base::ifelse(...)
   16.               ├─base::grepl("^(.*[^.]+.*)[.]([[:alnum:]]+)$", basename(x))
   17.               │ └─base::is.factor(x)
   18.               └─base::basename(x)
  ── Failure ('test-add_panels.R:50:3'): add rows works with bold argument/italic/hline ──
  Expected `panelsummary(...)` not to throw any errors.
  Actually got a <simpleError> with message:
    a character vector argument expected
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test-add_panels.R:50: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. └─panelsummary::panelsummary(...)
    8.   └─base::lapply(...)
    9.     └─panelsummary (local) FUN(X[[i]], ...)
   10.       └─modelsummary::modelsummary(...)
   11.         └─modelsummary:::factory(...)
   12.           └─modelsummary (local) factory_fun(...)
   13.             ├─base::isTRUE(tools::file_ext(output_file) == "csv")
   14.             └─tools::file_ext(output_file)
   15.               ├─base::ifelse(...)
   16.               ├─base::grepl("^(.*[^.]+.*)[.]([[:alnum:]]+)$", basename(x))
   17.               │ └─base::is.factor(x)
   18.               └─base::basename(x)
  ── Error ('test-helper_functions.R:30:30'): row indices for each panel appear and are correct::lm ──
  Error in `basename(x)`: a character vector argument expected
  Backtrace:
       ▆
    1. └─base::lapply(...) at test-helper_functions.R:30:3
    2.   └─panelsummary (local) FUN(X[[i]], ...)
    3.     └─modelsummary::modelsummary(x, output = "data.frame") at test-helper_functions.R:30:30
    4.       └─modelsummary:::factory(...)
    5.         └─modelsummary (local) factory_fun(...)
    6.           ├─base::isTRUE(tools::file_ext(output_file) == "csv")
    7.           └─tools::file_ext(output_file)
    8.             ├─base::ifelse(...)
    9.             ├─base::grepl("^(.*[^.]+.*)[.]([[:alnum:]]+)$", basename(x))
   10.             │ └─base::is.factor(x)
   11.             └─base::basename(x)
  ── Error ('test-panelsummary_raw.R:6:3'): panelsummary_raw returns a data.frame, not other object ──
  Error in `basename(x)`: a character vector argument expected
  Backtrace:
       ▆
    1. └─panelsummary::panelsummary_raw(ols_1, ols_2) at test-panelsummary_raw.R:6:3
    2.   └─base::lapply(...)
    3.     └─panelsummary (local) FUN(X[[i]], ...)
    4.       └─modelsummary::modelsummary(...)
    5.         └─modelsummary:::factory(...)
    6.           └─modelsummary (local) factory_fun(...)
    7.             ├─base::isTRUE(tools::file_ext(output_file) == "csv")
    8.             └─tools::file_ext(output_file)
    9.               ├─base::ifelse(...)
   10.               ├─base::grepl("^(.*[^.]+.*)[.]([[:alnum:]]+)$", basename(x))
   11.               │ └─base::is.factor(x)
   12.               └─base::basename(x)
  ── Error ('test-panelsummary_raw.R:14:3'): panelsummary_raw returns a data.frame, not other object when using lists as inputs ──
  Error in `basename(x)`: a character vector argument expected
  Backtrace:
       ▆
    1. └─panelsummary::panelsummary_raw(list(ols_1, ols_1), ols_2) at test-panelsummary_raw.R:14:3
    2.   └─base::lapply(...)
    3.     └─panelsummary (local) FUN(X[[i]], ...)
    4.       └─modelsummary::modelsummary(...)
    5.         └─modelsummary:::factory(...)
    6.           └─modelsummary (local) factory_fun(...)
    7.             ├─base::isTRUE(tools::file_ext(output_file) == "csv")
    8.             └─tools::file_ext(output_file)
    9.               ├─base::ifelse(...)
   10.               ├─base::grepl("^(.*[^.]+.*)[.]([[:alnum:]]+)$", basename(x))
   11.               │ └─base::is.factor(x)
   12.               └─base::basename(x)
  
  [ FAIL 6 | WARN 0 | SKIP 13 | PASS 7 ]
  Error:
  ! Test failures.
  Execution halted