* using log directory 'd:/Rcompile/CRANpkg/local/3.6/BayesPostEst.Rcheck' * using R version 3.6.3 (2020-02-29) * using platform: x86_64-w64-mingw32 (64-bit) * using session charset: ISO8859-1 * checking for file 'BayesPostEst/DESCRIPTION' ... OK * checking extension type ... Package * this is package 'BayesPostEst' version '0.3.1' * package encoding: UTF-8 * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking whether package 'BayesPostEst' can be installed ... OK * checking installed package size ... OK * checking package directory ... OK * checking 'build' directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking R files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... OK * checking use of S3 registration ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... [9s] NOTE plot.mcmcRocPrc: no visible global function definition for 'plot' Undefined global functions or variables: plot Consider adding importFrom("graphics", "plot") to your NAMESPACE file. * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking contents of 'data' directory ... OK * checking data for non-ASCII characters ... OK * checking data for ASCII and uncompressed saves ... OK * checking installed files from 'inst/doc' ... OK * checking files in 'vignettes' ... OK * checking examples ... [5s] OK * checking for unstated dependencies in 'tests' ... OK * checking tests ... [52s] ERROR 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 * checking for unstated dependencies in vignettes ... OK * checking package vignettes in 'inst/doc' ... OK * checking re-building of vignette outputs ... [104s] OK * checking PDF version of manual ... OK * DONE Status: 1 ERROR, 1 NOTE