Running ‘testthat.R’ [108s/132s]
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/testing-design.html#sec-tests-files-overview
  > # * https://testthat.r-lib.org/articles/special-files.html
  > 
  > library(testthat)
  > library(BayesERtools)
  > 
  > test_check("BayesERtools")
  Loading required namespace: projpred
  Saving _problems/test-dev_ermod_lin-229.R
  
  Diagnostic flags present.
  See ?`loo-glossary` (sections `diag_diff` and `diag_elpd`)
  or https://mc-stan.org/loo/reference/loo-glossary.html.
  Loading required package: bayestestR
  [ FAIL 4 | WARN 0 | SKIP 0 | PASS 209 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-dev_ermod_emax.R:150:5'): plot_ermod ───────────────────────────
  Error in `tidyr::pivot_longer(extract_data(x), dplyr::all_of(var_exp_order), names_to = ".exp_metric", values_to = ".exposure")`: i In argument: `dplyr::all_of(var_exp_order)`.
  Caused by error in `dplyr::all_of()`:
  ! Can't subset elements that don't exist.
  x Elements `1` and `2` don't exist.
  ── Error ('test-dev_ermod_emax.R:194:5'): plot_ermod_bin_emax ──────────────────
  Error in `tidyr::pivot_longer(extract_data(x), dplyr::all_of(var_exp_order), names_to = ".exp_metric", values_to = ".exposure")`: i In argument: `dplyr::all_of(var_exp_order)`.
  Caused by error in `dplyr::all_of()`:
  ! Can't subset elements that don't exist.
  x Elements `1` and `2` don't exist.
  ── Error ('test-dev_ermod_lin.R:229:5'): Exposure metrics selection ────────────
  Error in `tidyr::pivot_longer(extract_data(x), dplyr::all_of(var_exp_order), names_to = ".exp_metric", values_to = ".exposure")`: i In argument: `dplyr::all_of(var_exp_order)`.
  Caused by error in `dplyr::all_of()`:
  ! Can't subset elements that don't exist.
  x Elements `1`, `2`, and `3` don't exist.
  ── Error ('test-dev_ermod_lin.R:427:5'): plot.ermod_exp_sel calls plot_er_exp_sel ──
  Error in `tidyr::pivot_longer(extract_data(x), dplyr::all_of(var_exp_order), names_to = ".exp_metric", values_to = ".exposure")`: i In argument: `dplyr::all_of(var_exp_order)`.
  Caused by error in `dplyr::all_of()`:
  ! Can't subset elements that don't exist.
  x Elements `1`, `2`, and `3` don't exist.
  
  [ FAIL 4 | WARN 0 | SKIP 0 | PASS 209 ]
  Error:
  ! Test failures.
  Execution halted