Running 'testthat.R' [51s]
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 ================================================================
  -- Failure (test_mcmcRocPrc.R:28:3): constructor rejects invalid input ---------
  `new_mcmcRocPrc(pred_prob[-1, ], yvec, FALSE, FALSE)` threw an error with unexpected message.
  Expected match: "number of predictions and observed outcomes do not match"
  Actual message: "nrow(pred_prob) == length(yvec) is not TRUE"
  Backtrace:
      x
   1. +-testthat::expect_error(...) test_mcmcRocPrc.R:28: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:::new_mcmcRocPrc(pred_prob[-1, ], yvec, FALSE, FALSE)
   7.   \-base::stopifnot(...)
  -- Failure (test_mcmcRocPrc.R:35:3): constructor rejects invalid input ---------
  `new_mcmcRocPrc(pred_prob, tmp, FALSE, FALSE)` threw an error with unexpected message.
  Expected match: "yvec must be 0 or 1"
  Actual message: "all(yvec %in% c(0L, 1L)) is not TRUE"
  Backtrace:
      x
   1. +-testthat::expect_error(...) test_mcmcRocPrc.R:35: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:::new_mcmcRocPrc(pred_prob, tmp, FALSE, FALSE)
   7.   \-base::stopifnot(...)
  -- Failure (test_mcmcRocPrc.R:42:3): constructor rejects invalid input ---------
  `new_mcmcRocPrc(tmp, yvec, FALSE, FALSE)` threw an error with unexpected message.
  Expected match: "must be in the interval"
  Actual message: "all(pred_prob >= 0 & pred_prob <= 1) is not TRUE"
  Backtrace:
      x
   1. +-testthat::expect_error(...) test_mcmcRocPrc.R:42: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:::new_mcmcRocPrc(tmp, yvec, FALSE, FALSE)
   7.   \-base::stopifnot(...)
  -- Failure (test_mcmcRocPrc.R:51:3): .default method rejects invalid input -----
  `mcmcRocPrc(pred_prob[, 1], FALSE, FALSE, yvec)` threw an error with unexpected message.
  Expected match: "requires 'matrix'"
  Actual message: "inherits(pred_prob, \"matrix\") is not TRUE"
  Backtrace:
      x
   1. +-testthat::expect_error(...) test_mcmcRocPrc.R:51: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(pred_prob[, 1], FALSE, FALSE, yvec)
   7. \-BayesPostEst:::mcmcRocPrc.default(...)
   8.   \-base::stopifnot(...)
  -- Failure (test_mcmcRocPrc.R:428:3): plot method gives informative errors -----
  `plot(no_curves)` threw an error with unexpected message.
  Expected match: "to generate data for plots"
  Actual message: "(!is.null(x$roc_dat)) is not TRUE"
  Backtrace:
      x
   1. +-testthat::expect_error(plot(no_curves), "to generate data for plots") test_mcmcRocPrc.R:428:2
   2. | \-testthat:::quasi_capture(...)
   3. |   +-testthat:::.capture(...)
   4. |   | \-base::withCallingHandlers(...)
   5. |   \-rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. +-graphics::plot(no_curves)
   7. \-BayesPostEst:::plot.mcmcRocPrc(no_curves)
   8.   \-base::stopifnot(...)
  -- Failure (test_mcmcRocPrc.R:429:3): plot method gives informative errors -----
  `plot(with_curves, n = 0)` threw an error with unexpected message.
  Expected match: "n must be"
  Actual message: "(n > 0) is not TRUE"
  Backtrace:
      x
   1. +-testthat::expect_error(plot(with_curves, n = 0), "n must be") test_mcmcRocPrc.R:429:2
   2. | \-testthat:::quasi_capture(...)
   3. |   +-testthat:::.capture(...)
   4. |   | \-base::withCallingHandlers(...)
   5. |   \-rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. +-graphics::plot(with_curves, n = 0)
   7. \-BayesPostEst:::plot.mcmcRocPrc(with_curves, n = 0)
   8.   \-base::stopifnot(...)
  -- Failure (test_mcmcRocPrc.R:430:3): plot method gives informative errors -----
  `plot(with_curves, alpha = 5)` threw an error with unexpected message.
  Expected match: "alpha must be"
  Actual message: "(alpha >= 0 & alpha <= 1) is not TRUE"
  Backtrace:
      x
   1. +-testthat::expect_error(plot(with_curves, alpha = 5), "alpha must be") test_mcmcRocPrc.R:430:2
   2. | \-testthat:::quasi_capture(...)
   3. |   +-testthat:::.capture(...)
   4. |   | \-base::withCallingHandlers(...)
   5. |   \-rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. +-graphics::plot(with_curves, alpha = 5)
   7. \-BayesPostEst:::plot.mcmcRocPrc(with_curves, alpha = 5)
   8.   \-base::stopifnot(...)
  -- Failure (test_mcmcRocPrc.R:439:3): plot method works ------------------------
  `plot(no_curves)` threw an error with unexpected message.
  Expected match: "to generate data for plots"
  Actual message: "(!is.null(x$roc_dat)) is not TRUE"
  Backtrace:
      x
   1. +-testthat::expect_error(plot(no_curves), "to generate data for plots") test_mcmcRocPrc.R:439:2
   2. | \-testthat:::quasi_capture(...)
   3. |   +-testthat:::.capture(...)
   4. |   | \-base::withCallingHandlers(...)
   5. |   \-rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. +-graphics::plot(no_curves)
   7. \-BayesPostEst:::plot.mcmcRocPrc(no_curves)
   8.   \-base::stopifnot(...)
  -- Failure (test_mcmcRocPrc.R:440:3): plot method works ------------------------
  `plot(full_no_curves)` threw an error with unexpected message.
  Expected match: "to generate data for plots"
  Actual message: "(!is.null(x$roc_dat)) is not TRUE"
  Backtrace:
      x
   1. +-testthat::expect_error(plot(full_no_curves), "to generate data for plots") test_mcmcRocPrc.R:440:2
   2. | \-testthat:::quasi_capture(...)
   3. |   +-testthat:::.capture(...)
   4. |   | \-base::withCallingHandlers(...)
   5. |   \-rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. +-graphics::plot(full_no_curves)
   7. \-BayesPostEst:::plot.mcmcRocPrc(full_no_curves)
   8.   \-base::stopifnot(...)
  
  [ FAIL 9 | WARN 0 | SKIP 0 | PASS 123 ]
  Error: Test failures
  Execution halted