Running 'testthat.R'
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(BayesPostEst)
  > 
  > test_check("BayesPostEst")
  Loading required package: rjags
  Loading required package: coda
  Linked to JAGS 4.3.0
  Loaded modules: basemod,bugs
  
  Attaching package: 'R2jags'
  
  The following object is masked from 'package:coda':
  
      traceplot
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (test_mcmcRocPrc.R:208:3): binary/non-binary stanfit models are correctly IDd ──
  Error: unable to find required package 'rstan'
  Backtrace:
      █
   1. ├─testthat::expect_true(is_binary_model(rstan_logit)) test_mcmcRocPrc.R:208:2
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. ├─BayesPostEst:::is_binary_model(rstan_logit)
   5. │ └─base::stopifnot(inherits(obj, "stanfit"))
   6. └─methods:::.extendsForS3(structure("stanfit", package = "rstan"))
   7.   └─methods::extends(Class, maybe = FALSE)
   8.     └─methods::getClassDef(class1)
   9.       └─methods:::.requirePackage(package)
  ── Failure (test_mcmcRocPrc.R:223:3): RStan input works ────────────────────────
  `... <- NULL` threw an error.
  Message: unable to find required package 'rstan'
  Class:   simpleError/error/condition
  Backtrace:
       █
    1. ├─testthat::expect_error(...) test_mcmcRocPrc.R:223:2
    2. │ └─testthat:::quasi_capture(...)
    3. │   ├─testthat:::.capture(...)
    4. │   │ └─base::withCallingHandlers(...)
    5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    6. ├─BayesPostEst::mcmcRocPrc(...)
    7. └─methods:::.extendsForS3(structure("stanfit", package = "rstan"))
    8.   └─methods::extends(Class, maybe = FALSE)
    9.     └─methods::getClassDef(class1)
   10.       └─methods:::.requirePackage(package)
  ── Failure (test_mcmcRocPrc.R:236:3): rstanarm input works ─────────────────────
  `out <- mcmcRocPrc(rstanarm_logit, FALSE, FALSE)` threw an error.
  Message: Package "rstanarm" is needed for this function to work. Please install it.
  Class:   simpleError/error/condition
  Backtrace:
      █
   1. ├─testthat::expect_error(...) test_mcmcRocPrc.R:236:2
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. ├─BayesPostEst::mcmcRocPrc(rstanarm_logit, FALSE, FALSE)
   7. └─BayesPostEst:::mcmcRocPrc.stanreg(rstanarm_logit, FALSE, FALSE)
  ── Failure (test_mcmcRocPrc.R:245:3): rstanarm input works ─────────────────────
  `mcmcRocPrc(dummy_model)` threw an error with unexpected message.
  Expected match: "does not seem to be a binary choice model"
  Actual message: "Package \"rstanarm\" is needed for this function to work. Please install it."
  Backtrace:
      █
   1. ├─testthat::expect_error(mcmcRocPrc(dummy_model), "does not seem to be a binary choice model") test_mcmcRocPrc.R:245:2
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. ├─BayesPostEst::mcmcRocPrc(dummy_model)
   7. └─BayesPostEst:::mcmcRocPrc.stanreg(dummy_model)
  ── Failure (test_mcmcRocPrc.R:260:3): brms input works ─────────────────────────
  `out <- mcmcRocPrc(brms_logit, FALSE, FALSE)` threw an error.
  Message: Package "brms" is needed for this function to work. Please install it.
  Class:   simpleError/error/condition
  Backtrace:
      █
   1. ├─testthat::expect_error(...) test_mcmcRocPrc.R:260:2
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. ├─BayesPostEst::mcmcRocPrc(brms_logit, FALSE, FALSE)
   7. └─BayesPostEst:::mcmcRocPrc.brmsfit(brms_logit, FALSE, FALSE)
  ── Failure (test_mcmcRocPrc.R:268:3): brms input works ─────────────────────────
  `mcmcRocPrc(dummy_model)` threw an error with unexpected message.
  Expected match: "does not seem to be a binary choice model"
  Actual message: "Package \"brms\" is needed for this function to work. Please install it."
  Backtrace:
      █
   1. ├─testthat::expect_error(mcmcRocPrc(dummy_model), "does not seem to be a binary choice model") test_mcmcRocPrc.R:268:2
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. ├─BayesPostEst::mcmcRocPrc(dummy_model)
   7. └─BayesPostEst:::mcmcRocPrc.brmsfit(dummy_model)
  
  [ FAIL 6 | WARN 2 | SKIP 0 | PASS 125 ]
  Error: Test failures
  Execution halted