Running ‘testthat.R’ [20s/31s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(mcmcr)
  > 
  > test_check("mcmcr")
  [ FAIL 8 | WARN 0 | SKIP 0 | PASS 410 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (test-converged.R:31:3): converged.mcmcr ──────────────────────────────
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(x)`: there is no package called 'readr'
  Backtrace:
      ▆
   1. ├─mcmcr:::expect_snapshot_data(...) at test-converged.R:31:2
   2. │ └─mcmcr:::save_csv(x)
   3. └─base::loadNamespace(x)
   4.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   5.     └─base withOneRestart(expr, restarts[[1L]])
   6.       └─base doWithOneRestart(return(expr), restart)
  ── Failure (test-esr.R:48:3): esr.mcmc ─────────────────────────────────────────
  esr(mcmc, by = "term", as_df = TRUE) (`actual`) not equal to tibble(...) (`expected`).
  
  `attr(actual, 'row.names')` is a character vector ('alpha.1', 'alpha.2', 'beta.1', 'beta.2', 'beta.3', ...)
  `attr(expected, 'row.names')` is an integer vector (1, 2, 3, 4, 5, ...)
  ── Failure (test-esr.R:56:3): esr.mcmc.list ────────────────────────────────────
  esr(as.mcmc.list(mcmcr::mcmcr_example), by = "term", as_df = TRUE) (`actual`) not equal to tibble(...) (`expected`).
  
  `attr(actual, 'row.names')` is a character vector ('alpha.1', 'alpha.2', 'beta.1', 'beta.2', 'beta.3', ...)
  `attr(expected, 'row.names')` is an integer vector (1, 2, 3, 4, 5, ...)
  ── Failure (test-esr.R:66:3): esr.mcmcr ────────────────────────────────────────
  esr(mcmcr_example, by = "term", as_df = TRUE) (`actual`) not equal to tibble(...) (`expected`).
  
  `attr(actual, 'row.names')` is a character vector ('alpha.1', 'alpha.2', 'beta.1', 'beta.2', 'beta.3', ...)
  `attr(expected, 'row.names')` is an integer vector (1, 2, 3, 4, 5, ...)
  ── Error (test-ess.R:23:3): ess.mcmcr as df ────────────────────────────────────
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(x)`: there is no package called 'readr'
  Backtrace:
      ▆
   1. ├─mcmcr:::expect_snapshot_data(...) at test-ess.R:23:2
   2. │ └─mcmcr:::save_csv(x)
   3. └─base::loadNamespace(x)
   4.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   5.     └─base withOneRestart(expr, restarts[[1L]])
   6.       └─base doWithOneRestart(return(expr), restart)
  ── Error (test-estimates.R:4:3): estimates.mcarray ─────────────────────────────
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(x)`: there is no package called 'readr'
  Backtrace:
      ▆
   1. ├─mcmcr:::expect_snapshot_data(...) at test-estimates.R:4:2
   2. │ └─mcmcr:::save_csv(x)
   3. └─base::loadNamespace(x)
   4.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   5.     └─base withOneRestart(expr, restarts[[1L]])
   6.       └─base doWithOneRestart(return(expr), restart)
  ── Failure (test-rhat.R:65:3): rhat.mcmcr ──────────────────────────────────────
  rhat(mcmcr_example, by = "parameter", as_df = TRUE) (`actual`) not equal to tibble(...) (`expected`).
  
  `attr(actual, 'row.names')` is a character vector ('alpha', 'beta', 'sigma')
  `attr(expected, 'row.names')` is an integer vector (1, 2, 3)
  ── Failure (test-rhat.R:67:3): rhat.mcmcr ──────────────────────────────────────
  rhat(mcmcr_example, by = "term", as_df = TRUE) (`actual`) not equal to tibble(...) (`expected`).
  
  `attr(actual, 'row.names')` is a character vector ('alpha.1', 'alpha.2', 'beta.1', 'beta.2', 'beta.3', ...)
  `attr(expected, 'row.names')` is an integer vector (1, 2, 3, 4, 5, ...)
  
  [ FAIL 8 | WARN 0 | SKIP 0 | PASS 410 ]
  Deleting unused snapshots:
  • converged/converged.csv
  • ess/ess.csv
  • estimates/estimates.csv
  Error: Test failures
  Execution halted