Running ‘testthat.R’ [16s/19s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(dominanceanalysis)
  > 
  > test_check("dominanceanalysis")
  [ FAIL 9 | WARN 1 | SKIP 0 | PASS 163 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-da-with-lmm.R:3:1'): (code run outside of `test_that()`) ───────
  <packageNotFoundError/error/condition>
  Error in `library(lme4)`: there is no package called 'lme4'
  Backtrace:
      ▆
   1. └─base::library(lme4) at test-da-with-lmm.R:3:1
  ── Error ('test-daAverageBootstrap.R:55:3'): should work for lme4 ──────────────
  <packageNotFoundError/error/condition>
  Error in `library(lme4)`: there is no package called 'lme4'
  Backtrace:
      ▆
   1. └─base::library(lme4) at test-daAverageBootstrap.R:55:3
  ── Error ('test-daSubModels.R:74:2'): Correct submodels for standard data.frame and lmer ──
  Error in `lmer(y ~ xa + xb + xc + (1 | g), d.f)`: could not find function "lmer"
  ── Error ('test-dominance-analysis-plots.R:21:3'): complete graph without facetshould be a ggplot object ──
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(x)`: there is no package called 'reshape2'
  Backtrace:
      ▆
   1. ├─base::plot(da.attitude, which.graph = "complete_no_facet") at test-dominance-analysis-plots.R:21:3
   2. ├─dominanceanalysis:::plot.dominanceAnalysis(da.attitude, which.graph = "complete_no_facet")
   3. │ └─stats::na.omit(reshape2::melt(x.df, id.vars = c(".level", ".names")))
   4. └─base::loadNamespace(x)
   5.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   6.     └─base (local) withOneRestart(expr, restarts[[1L]])
   7.       └─base (local) doWithOneRestart(return(expr), restart)
  ── Error ('test-dominance-analysis-plots.R:26:3'): conditional graph without facetshould be a ggplot object ──
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(x)`: there is no package called 'reshape2'
  Backtrace:
      ▆
   1. ├─base::plot(da.attitude, which.graph = "conditional") at test-dominance-analysis-plots.R:26:3
   2. ├─dominanceanalysis:::plot.dominanceAnalysis(da.attitude, which.graph = "conditional")
   3. └─base::loadNamespace(x)
   4.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   5.     └─base (local) withOneRestart(expr, restarts[[1L]])
   6.       └─base (local) doWithOneRestart(return(expr), restart)
  ── Error ('test-dominanceanalysis-with-dynlm.R:3:1'): (code run outside of `test_that()`) ──
  <packageNotFoundError/error/condition>
  Error in `library(dynlm)`: there is no package called 'dynlm'
  Backtrace:
      ▆
   1. └─base::library(dynlm) at test-dominanceanalysis-with-dynlm.R:3:1
  ── Error ('test-getdata-method.R:2:1'): (code run outside of `test_that()`) ────
  <packageNotFoundError/error/condition>
  Error in `library(lme4)`: there is no package called 'lme4'
  Backtrace:
      ▆
   1. └─base::library(lme4) at test-getdata-method.R:2:1
  ── Error ('test-lmWithCovsMlm.R:3:1'): (code run outside of `test_that()`) ─────
  <packageNotFoundError/error/condition>
  Error in `library(car)`: there is no package called 'car'
  Backtrace:
      ▆
   1. └─base::library(car) at test-lmWithCovsMlm.R:3:1
  ── Error ('test-lmmR2-lme4.R:2:1'): (code run outside of `test_that()`) ────────
  <packageNotFoundError/error/condition>
  Error in `library(lme4)`: there is no package called 'lme4'
  Backtrace:
      ▆
   1. └─base::library(lme4) at test-lmmR2-lme4.R:2:1
  
  [ FAIL 9 | WARN 1 | SKIP 0 | PASS 163 ]
  Error: Test failures
  Execution halted