CRAN Package Check Results for Package caretEnsemble

Last updated on 2019-11-26 00:51:46 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 2.0.0 11.97 209.35 221.32 ERROR
r-devel-linux-x86_64-debian-gcc 2.0.0 12.36 151.40 163.76 ERROR
r-devel-linux-x86_64-fedora-clang 2.0.0 472.86 OK
r-devel-linux-x86_64-fedora-gcc 2.0.0 440.97 OK
r-devel-windows-ix86+x86_64 2.0.0 52.00 426.00 478.00 OK
r-devel-windows-ix86+x86_64-gcc8 2.0.0 27.00 360.00 387.00 OK
r-patched-linux-x86_64 2.0.0 13.33 361.44 374.77 OK
r-patched-solaris-x86 2.0.0 672.80 OK
r-release-linux-x86_64 2.0.0 13.17 364.82 377.99 OK
r-release-windows-ix86+x86_64 2.0.0 42.00 329.00 371.00 OK
r-release-osx-x86_64 2.0.0 OK
r-oldrel-windows-ix86+x86_64 2.0.0 19.00 425.00 444.00 OK
r-oldrel-osx-x86_64 2.0.0 OK

Check Details

Version: 2.0.0
Check: tests
Result: ERROR
     Running 'testthat.R' [63s/63s]
    Running the tests in 'tests/testthat.R' failed.
    Complete output:
     > library(testthat)
     > library(caretEnsemble)
     >
     > test_check("caretEnsemble")
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
     :
     --- package (from environment) ---
     caretEnsemble
     --- call from context ---
     predict.caretList(models)
     --- call from argument ---
     if (class(preds) != "matrix" & class(preds) != "data.frame") {
     if (class(preds) == "character" | class(preds) == "factor") {
     preds <- as.character(preds)
     }
     preds <- as.matrix(t(preds))
     }
     --- R stacktrace ---
     where 1: predict.caretList(models)
     where 2: predict(models)
     where 3: eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
     where 4: withCallingHandlers(code, warning = function(condition) {
     out$push(condition)
     maybe_restart("muffleWarning")
     })
     where 5: .capture(act$val <- eval_bare(quo_get_expr(.quo), quo_get_env(.quo)),
     ...)
     where 6: quasi_capture(enquo(object), label, capture_warnings)
     where 7 at testthat/test-caretList.R#109: expect_warning(p1 <- predict(models))
     where 8: eval(code, test_env)
     where 9: eval(code, test_env)
     where 10: withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error)
     where 11: doTryCatch(return(expr), name, parentenv, handler)
     where 12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 13: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 14: doTryCatch(return(expr), name, parentenv, handler)
     where 15: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 16: tryCatchList(expr, classes, parentenv, handlers)
     where 17: tryCatch(withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error), error = handle_fatal,
     skip = function(e) {
     })
     where 18: test_code(desc, code, env = parent.frame())
     where 19 at testthat/test-caretList.R#94: test_that("caretList predictions", {
     skip_if_not_installed("randomForest")
     skip_if_not_installed("nnet")
     skip_if_not_installed("plyr")
     expect_warning({
     models <- caretList(iris[, 1:2], iris[, 5], tuneLength = 1,
     verbose = FALSE, methodList = "rf", tuneList = list(nnet = caretModelSpec(method = "nnet",
     trace = FALSE)), trControl = trainControl(method = "cv",
     number = 2, savePredictions = "final", classProbs = FALSE))
     })
     expect_warning(p1 <- predict(models))
     p2 <- predict(models, newdata = iris[100, c(1:2)])
     p3 <- predict(models, newdata = iris[110, c(1:2)])
     expect_is(p1, "matrix")
     expect_is(p1[, 1], "character")
     expect_is(p1[, 2], "character")
     expect_equal(names(models), colnames(p1))
     expect_is(p2, "matrix")
     expect_is(p2[, 1], "character")
     expect_is(p2[, 2], "character")
     expect_equal(names(models), colnames(p2))
     expect_is(p3, "matrix")
     expect_is(p3[, 1], "character")
     expect_is(p3[, 2], "character")
     expect_equal(names(models), colnames(p3))
     expect_warning({
     models <- caretList(iris[, 1:2], iris[, 5], tuneLength = 1,
     verbose = FALSE, methodList = "rf", tuneList = list(nnet = caretModelSpec(method = "nnet",
     trace = FALSE)), trControl = trainControl(method = "cv",
     number = 2, savePredictions = "final", classProbs = TRUE))
     })
     expect_warning(p2 <- predict(models))
     p3 <- predict(models, newdata = iris[100, c(1:2)])
     expect_is(p2, "matrix")
     expect_is(p2[, 1], "numeric")
     expect_is(p2[, 2], "numeric")
     expect_is(p3, "matrix")
     expect_is(p3[, 1], "numeric")
     expect_is(p3[, 2], "numeric")
     expect_equal(names(models), colnames(p3))
     models[[1]]$modelType <- "Bogus"
     expect_error(expect_warning(predict(models)))
     })
     where 20: eval(code, test_env)
     where 21: eval(code, test_env)
     where 22: withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error)
     where 23: doTryCatch(return(expr), name, parentenv, handler)
     where 24: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 25: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 26: doTryCatch(return(expr), name, parentenv, handler)
     where 27: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 28: tryCatchList(expr, classes, parentenv, handlers)
     where 29: tryCatch(withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error), error = handle_fatal,
     skip = function(e) {
     })
     where 30: test_code(NULL, exprs, env)
     where 31: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
     where 32: force(code)
     where 33: doWithOneRestart(return(expr), restart)
     where 34: withOneRestart(expr, restarts[[1L]])
     where 35: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 36: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter,
     {
     reporter$start_file(basename(path))
     lister$start_file(basename(path))
     source_file(path, new.env(parent = env), chdir = TRUE,
     wrap = wrap)
     reporter$.end_context()
     reporter$end_file()
     })
     where 37: FUN(X[[i]], ...)
     where 38: lapply(paths, test_file, env = env, reporter = current_reporter,
     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
     where 39: force(code)
     where 40: doWithOneRestart(return(expr), restart)
     where 41: withOneRestart(expr, restarts[[1L]])
     where 42: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 43: with_reporter(reporter = current_reporter, results <- lapply(paths,
     test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE,
     load_helpers = FALSE, wrap = wrap))
     where 44: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 45: test_dir(path = test_path, reporter = reporter, env = env, filter = filter,
     ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,
     wrap = wrap)
     where 46: test_package_dir(package = package, test_path = test_path, filter = filter,
     reporter = reporter, ..., stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 47: test_check("caretEnsemble")
    
     --- value of length: 2 type: logical ---
     [1] FALSE TRUE
     --- function from context ---
     function (object, newdata = NULL, ..., verbose = FALSE)
     {
     if (is.null(newdata)) {
     warning("Predicting without new data is not well supported. Attempting to predict on the training data.")
     newdata <- object[[1]]$trainingData
     if (is.null(newdata)) {
     stop("Could not find training data in the first model in the ensemble.")
     }
     }
     if (verbose == TRUE) {
     pboptions(type = "txt", char = "*")
     }
     else if (verbose == FALSE) {
     pboptions(type = "none")
     }
     preds <- pbsapply(object, function(x) {
     type <- x$modelType
     if (type == "Classification") {
     if (x$control$classProbs) {
     caret::predict.train(x, type = "prob", newdata = newdata,
     ...)[, 2]
     }
     else {
     caret::predict.train(x, type = "raw", newdata = newdata,
     ...)
     }
     }
     else if (type == "Regression") {
     caret::predict.train(x, type = "raw", newdata = newdata,
     ...)
     }
     else {
     stop(paste("Unknown model type:", type))
     }
     })
     if (class(preds) != "matrix" & class(preds) != "data.frame") {
     if (class(preds) == "character" | class(preds) == "factor") {
     preds <- as.character(preds)
     }
     preds <- as.matrix(t(preds))
     }
     colnames(preds) <- make.names(sapply(object, function(x) x$method),
     unique = TRUE)
     return(preds)
     }
     <bytecode: 0xd4233a0>
     <environment: namespace:caretEnsemble>
     --- function search by body ---
     Function predict.caretList in namespace caretEnsemble has this body.
     ----------- END OF FAILURE REPORT --------------
     Fatal error: the condition has length > 1
Flavor: r-devel-linux-x86_64-debian-clang

Version: 2.0.0
Check: re-building of vignette outputs
Result: WARN
    Error(s) in re-building vignettes:
     ...
    --- re-building 'caretEnsemble-intro.Rmd' using rmarkdown
    Warning in train.default(x, y, weights = w, ...) :
     The metric "Accuracy" was not in the result set. ROC will be used instead.
    Warning: glm.fit: algorithm did not converge
    Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
    Warning: glm.fit: algorithm did not converge
    Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
    Warning: glm.fit: algorithm did not converge
    Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
    Warning: glm.fit: algorithm did not converge
    Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
    Warning: glm.fit: algorithm did not converge
    Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
    Warning: glm.fit: algorithm did not converge
    Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
    Warning: glm.fit: algorithm did not converge
    Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
    Warning: glm.fit: algorithm did not converge
    Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
    Warning: glm.fit: algorithm did not converge
    Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
    Warning: glm.fit: algorithm did not converge
    Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
    Warning: glm.fit: algorithm did not converge
    Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
    Warning: glm.fit: algorithm did not converge
    Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
    Warning: glm.fit: algorithm did not converge
    Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
    Warning: glm.fit: algorithm did not converge
    Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
    Warning: glm.fit: algorithm did not converge
    Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
    Warning: glm.fit: algorithm did not converge
    Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
    Warning: glm.fit: algorithm did not converge
    Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
    Warning: glm.fit: algorithm did not converge
    Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
    Warning: glm.fit: algorithm did not converge
    Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
    Warning: glm.fit: algorithm did not converge
    Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
    Warning: glm.fit: algorithm did not converge
    Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
    Warning: glm.fit: algorithm did not converge
    Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
    Warning: glm.fit: algorithm did not converge
    Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
    Warning: glm.fit: algorithm did not converge
    Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
    Warning: glm.fit: algorithm did not converge
    Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
    Warning: glm.fit: algorithm did not converge
    Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
    Warning in train.default(x, y, weights = w, ...) :
     The metric "Accuracy" was not in the result set. ROC will be used instead.
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    caretEnsemble
     --- call from context ---
    predict.caretList(model_list, newdata = head(testing))
     --- call from argument ---
    if (class(preds) != "matrix" & class(preds) != "data.frame") {
     if (class(preds) == "character" | class(preds) == "factor") {
     preds <- as.character(preds)
     }
     preds <- as.matrix(t(preds))
    }
     --- R stacktrace ---
    where 1: predict.caretList(model_list, newdata = head(testing))
    where 2: predict(model_list, newdata = head(testing))
    where 3: as.data.frame(predict(model_list, newdata = head(testing)))
    where 4: eval(expr, envir, enclos)
    where 5: eval(expr, envir, enclos)
    where 6: withVisible(eval(expr, envir, enclos))
    where 7: withCallingHandlers(withVisible(eval(expr, envir, enclos)), warning = wHandler,
     error = eHandler, message = mHandler)
    where 8: handle(ev <- withCallingHandlers(withVisible(eval(expr, envir,
     enclos)), warning = wHandler, error = eHandler, message = mHandler))
    where 9: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval(expr,
     envir, enclos)), warning = wHandler, error = eHandler, message = mHandler)))
    where 10: evaluate_call(expr, parsed$src[[i]], envir = envir, enclos = enclos,
     debug = debug, last = i == length(out), use_try = stop_on_error !=
     2L, keep_warning = keep_warning, keep_message = keep_message,
     output_handler = output_handler, include_timing = include_timing)
    where 11: evaluate::evaluate(...)
    where 12: evaluate(code, envir = env, new_device = FALSE, keep_warning = !isFALSE(options$warning),
     keep_message = !isFALSE(options$message), stop_on_error = if (options$error &&
     options$include) 0L else 2L, output_handler = knit_handlers(options$render,
     options))
    where 13: in_dir(input_dir(), evaluate(code, envir = env, new_device = FALSE,
     keep_warning = !isFALSE(options$warning), keep_message = !isFALSE(options$message),
     stop_on_error = if (options$error && options$include) 0L else 2L,
     output_handler = knit_handlers(options$render, options)))
    where 14: block_exec(params)
    where 15: call_block(x)
    where 16: process_group.block(group)
    where 17: process_group(group)
    where 18: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group),
     error = function(e) {
     setwd(wd)
     cat(res, sep = "\n", file = output %n% "")
     message("Quitting from lines ", paste(current_lines(i),
     collapse = "-"), " (", knit_concord$get("infile"),
     ") ")
     })
    where 19: process_file(text, output)
    where 20: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet,
     encoding = encoding)
    where 21: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(),
     ...)
    where 22: vweave_rmarkdown(...)
    where 23: engine$weave(file, quiet = quiet, encoding = enc)
    where 24: doTryCatch(return(expr), name, parentenv, handler)
    where 25: tryCatchOne(expr, names, parentenv, handlers[[1L]])
    where 26: tryCatchList(expr, classes, parentenv, handlers)
    where 27: tryCatch({
     engine$weave(file, quiet = quiet, encoding = enc)
     setwd(startdir)
     output <- find_vignette_product(name, by = "weave", engine = engine)
     if (!have.makefile && vignette_is_tex(output)) {
     texi2pdf(file = output, clean = FALSE, quiet = quiet)
     output <- find_vignette_product(name, by = "texi2pdf",
     engine = engine)
     }
     outputs <- c(outputs, output)
    }, error = function(e) {
     thisOK <<- FALSE
     fails <<- c(fails, file)
     message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s",
     file, conditionMessage(e)))
    })
    where 28: tools:::buildVignettes(dir = "/home/hornik/tmp/R.check/r-devel-clang/Work/PKGS/caretEnsemble.Rcheck/vign_test/caretEnsemble",
     ser_elibs = "/tmp/RtmpEfMT31/file4def10a2de2d.rds")
    
     --- value of length: 2 type: logical ---
    [1] FALSE TRUE
     --- function from context ---
    function (object, newdata = NULL, ..., verbose = FALSE)
    {
     if (is.null(newdata)) {
     warning("Predicting without new data is not well supported. Attempting to predict on the training data.")
     newdata <- object[[1]]$trainingData
     if (is.null(newdata)) {
     stop("Could not find training data in the first model in the ensemble.")
     }
     }
     if (verbose == TRUE) {
     pboptions(type = "txt", char = "*")
     }
     else if (verbose == FALSE) {
     pboptions(type = "none")
     }
     preds <- pbsapply(object, function(x) {
     type <- x$modelType
     if (type == "Classification") {
     if (x$control$classProbs) {
     caret::predict.train(x, type = "prob", newdata = newdata,
     ...)[, 2]
     }
     else {
     caret::predict.train(x, type = "raw", newdata = newdata,
     ...)
     }
     }
     else if (type == "Regression") {
     caret::predict.train(x, type = "raw", newdata = newdata,
     ...)
     }
     else {
     stop(paste("Unknown model type:", type))
     }
     })
     if (class(preds) != "matrix" & class(preds) != "data.frame") {
     if (class(preds) == "character" | class(preds) == "factor") {
     preds <- as.character(preds)
     }
     preds <- as.matrix(t(preds))
     }
     colnames(preds) <- make.names(sapply(object, function(x) x$method),
     unique = TRUE)
     return(preds)
    }
    <bytecode: 0x146a8b58>
    <environment: namespace:caretEnsemble>
     --- function search by body ---
    Function predict.caretList in namespace caretEnsemble has this body.
     ----------- END OF FAILURE REPORT --------------
    Fatal error: the condition has length > 1
Flavor: r-devel-linux-x86_64-debian-clang

Version: 2.0.0
Check: tests
Result: ERROR
     Running ‘testthat.R’ [45s/70s]
    Running the tests in ‘tests/testthat.R’ failed.
    Complete output:
     > library(testthat)
     > library(caretEnsemble)
     >
     > test_check("caretEnsemble")
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
     :
     --- package (from environment) ---
     caretEnsemble
     --- call from context ---
     predict.caretList(models)
     --- call from argument ---
     if (class(preds) != "matrix" & class(preds) != "data.frame") {
     if (class(preds) == "character" | class(preds) == "factor") {
     preds <- as.character(preds)
     }
     preds <- as.matrix(t(preds))
     }
     --- R stacktrace ---
     where 1: predict.caretList(models)
     where 2: predict(models)
     where 3: eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
     where 4: withCallingHandlers(code, warning = function(condition) {
     out$push(condition)
     maybe_restart("muffleWarning")
     })
     where 5: .capture(act$val <- eval_bare(quo_get_expr(.quo), quo_get_env(.quo)),
     ...)
     where 6: quasi_capture(enquo(object), label, capture_warnings)
     where 7 at testthat/test-caretList.R#109: expect_warning(p1 <- predict(models))
     where 8: eval(code, test_env)
     where 9: eval(code, test_env)
     where 10: withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error)
     where 11: doTryCatch(return(expr), name, parentenv, handler)
     where 12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 13: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 14: doTryCatch(return(expr), name, parentenv, handler)
     where 15: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 16: tryCatchList(expr, classes, parentenv, handlers)
     where 17: tryCatch(withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error), error = handle_fatal,
     skip = function(e) {
     })
     where 18: test_code(desc, code, env = parent.frame())
     where 19 at testthat/test-caretList.R#94: test_that("caretList predictions", {
     skip_if_not_installed("randomForest")
     skip_if_not_installed("nnet")
     skip_if_not_installed("plyr")
     expect_warning({
     models <- caretList(iris[, 1:2], iris[, 5], tuneLength = 1,
     verbose = FALSE, methodList = "rf", tuneList = list(nnet = caretModelSpec(method = "nnet",
     trace = FALSE)), trControl = trainControl(method = "cv",
     number = 2, savePredictions = "final", classProbs = FALSE))
     })
     expect_warning(p1 <- predict(models))
     p2 <- predict(models, newdata = iris[100, c(1:2)])
     p3 <- predict(models, newdata = iris[110, c(1:2)])
     expect_is(p1, "matrix")
     expect_is(p1[, 1], "character")
     expect_is(p1[, 2], "character")
     expect_equal(names(models), colnames(p1))
     expect_is(p2, "matrix")
     expect_is(p2[, 1], "character")
     expect_is(p2[, 2], "character")
     expect_equal(names(models), colnames(p2))
     expect_is(p3, "matrix")
     expect_is(p3[, 1], "character")
     expect_is(p3[, 2], "character")
     expect_equal(names(models), colnames(p3))
     expect_warning({
     models <- caretList(iris[, 1:2], iris[, 5], tuneLength = 1,
     verbose = FALSE, methodList = "rf", tuneList = list(nnet = caretModelSpec(method = "nnet",
     trace = FALSE)), trControl = trainControl(method = "cv",
     number = 2, savePredictions = "final", classProbs = TRUE))
     })
     expect_warning(p2 <- predict(models))
     p3 <- predict(models, newdata = iris[100, c(1:2)])
     expect_is(p2, "matrix")
     expect_is(p2[, 1], "numeric")
     expect_is(p2[, 2], "numeric")
     expect_is(p3, "matrix")
     expect_is(p3[, 1], "numeric")
     expect_is(p3[, 2], "numeric")
     expect_equal(names(models), colnames(p3))
     models[[1]]$modelType <- "Bogus"
     expect_error(expect_warning(predict(models)))
     })
     where 20: eval(code, test_env)
     where 21: eval(code, test_env)
     where 22: withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error)
     where 23: doTryCatch(return(expr), name, parentenv, handler)
     where 24: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     where 25: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
     where 26: doTryCatch(return(expr), name, parentenv, handler)
     where 27: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
     names[nh], parentenv, handlers[[nh]])
     where 28: tryCatchList(expr, classes, parentenv, handlers)
     where 29: tryCatch(withCallingHandlers({
     eval(code, test_env)
     if (!handled && !is.null(test)) {
     skip_empty()
     }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
     message = handle_message, error = handle_error), error = handle_fatal,
     skip = function(e) {
     })
     where 30: test_code(NULL, exprs, env)
     where 31: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
     where 32: force(code)
     where 33: doWithOneRestart(return(expr), restart)
     where 34: withOneRestart(expr, restarts[[1L]])
     where 35: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 36: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter,
     {
     reporter$start_file(basename(path))
     lister$start_file(basename(path))
     source_file(path, new.env(parent = env), chdir = TRUE,
     wrap = wrap)
     reporter$.end_context()
     reporter$end_file()
     })
     where 37: FUN(X[[i]], ...)
     where 38: lapply(paths, test_file, env = env, reporter = current_reporter,
     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
     where 39: force(code)
     where 40: doWithOneRestart(return(expr), restart)
     where 41: withOneRestart(expr, restarts[[1L]])
     where 42: withRestarts(testthat_abort_reporter = function() NULL, force(code))
     where 43: with_reporter(reporter = current_reporter, results <- lapply(paths,
     test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE,
     load_helpers = FALSE, wrap = wrap))
     where 44: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 45: test_dir(path = test_path, reporter = reporter, env = env, filter = filter,
     ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,
     wrap = wrap)
     where 46: test_package_dir(package = package, test_path = test_path, filter = filter,
     reporter = reporter, ..., stop_on_failure = stop_on_failure,
     stop_on_warning = stop_on_warning, wrap = wrap)
     where 47: test_check("caretEnsemble")
    
     --- value of length: 2 type: logical ---
     [1] FALSE TRUE
     --- function from context ---
     function (object, newdata = NULL, ..., verbose = FALSE)
     {
     if (is.null(newdata)) {
     warning("Predicting without new data is not well supported. Attempting to predict on the training data.")
     newdata <- object[[1]]$trainingData
     if (is.null(newdata)) {
     stop("Could not find training data in the first model in the ensemble.")
     }
     }
     if (verbose == TRUE) {
     pboptions(type = "txt", char = "*")
     }
     else if (verbose == FALSE) {
     pboptions(type = "none")
     }
     preds <- pbsapply(object, function(x) {
     type <- x$modelType
     if (type == "Classification") {
     if (x$control$classProbs) {
     caret::predict.train(x, type = "prob", newdata = newdata,
     ...)[, 2]
     }
     else {
     caret::predict.train(x, type = "raw", newdata = newdata,
     ...)
     }
     }
     else if (type == "Regression") {
     caret::predict.train(x, type = "raw", newdata = newdata,
     ...)
     }
     else {
     stop(paste("Unknown model type:", type))
     }
     })
     if (class(preds) != "matrix" & class(preds) != "data.frame") {
     if (class(preds) == "character" | class(preds) == "factor") {
     preds <- as.character(preds)
     }
     preds <- as.matrix(t(preds))
     }
     colnames(preds) <- make.names(sapply(object, function(x) x$method),
     unique = TRUE)
     return(preds)
     }
     <bytecode: 0x55a5ccb3d468>
     <environment: namespace:caretEnsemble>
     --- function search by body ---
     Function predict.caretList in namespace caretEnsemble has this body.
     ----------- END OF FAILURE REPORT --------------
     Fatal error: the condition has length > 1
Flavor: r-devel-linux-x86_64-debian-gcc

Version: 2.0.0
Check: re-building of vignette outputs
Result: WARN
    Error(s) in re-building vignettes:
     ...
    --- re-building ‘caretEnsemble-intro.Rmd’ using rmarkdown
    Warning in train.default(x, y, weights = w, ...) :
     The metric "Accuracy" was not in the result set. ROC will be used instead.
    Warning: glm.fit: algorithm did not converge
    Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
    Warning: glm.fit: algorithm did not converge
    Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
    Warning: glm.fit: algorithm did not converge
    Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
    Warning: glm.fit: algorithm did not converge
    Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
    Warning: glm.fit: algorithm did not converge
    Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
    Warning: glm.fit: algorithm did not converge
    Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
    Warning: glm.fit: algorithm did not converge
    Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
    Warning: glm.fit: algorithm did not converge
    Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
    Warning: glm.fit: algorithm did not converge
    Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
    Warning: glm.fit: algorithm did not converge
    Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
    Warning: glm.fit: algorithm did not converge
    Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
    Warning: glm.fit: algorithm did not converge
    Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
    Warning: glm.fit: algorithm did not converge
    Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
    Warning: glm.fit: algorithm did not converge
    Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
    Warning: glm.fit: algorithm did not converge
    Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
    Warning: glm.fit: algorithm did not converge
    Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
    Warning: glm.fit: algorithm did not converge
    Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
    Warning: glm.fit: algorithm did not converge
    Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
    Warning: glm.fit: algorithm did not converge
    Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
    Warning: glm.fit: algorithm did not converge
    Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
    Warning: glm.fit: algorithm did not converge
    Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
    Warning: glm.fit: algorithm did not converge
    Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
    Warning: glm.fit: algorithm did not converge
    Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
    Warning: glm.fit: algorithm did not converge
    Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
    Warning: glm.fit: algorithm did not converge
    Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
    Warning: glm.fit: algorithm did not converge
    Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
    Warning in train.default(x, y, weights = w, ...) :
     The metric "Accuracy" was not in the result set. ROC will be used instead.
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    caretEnsemble
     --- call from context ---
    predict.caretList(model_list, newdata = head(testing))
     --- call from argument ---
    if (class(preds) != "matrix" & class(preds) != "data.frame") {
     if (class(preds) == "character" | class(preds) == "factor") {
     preds <- as.character(preds)
     }
     preds <- as.matrix(t(preds))
    }
     --- R stacktrace ---
    where 1: predict.caretList(model_list, newdata = head(testing))
    where 2: predict(model_list, newdata = head(testing))
    where 3: as.data.frame(predict(model_list, newdata = head(testing)))
    where 4: eval(expr, envir, enclos)
    where 5: eval(expr, envir, enclos)
    where 6: withVisible(eval(expr, envir, enclos))
    where 7: withCallingHandlers(withVisible(eval(expr, envir, enclos)), warning = wHandler,
     error = eHandler, message = mHandler)
    where 8: handle(ev <- withCallingHandlers(withVisible(eval(expr, envir,
     enclos)), warning = wHandler, error = eHandler, message = mHandler))
    where 9: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval(expr,
     envir, enclos)), warning = wHandler, error = eHandler, message = mHandler)))
    where 10: evaluate_call(expr, parsed$src[[i]], envir = envir, enclos = enclos,
     debug = debug, last = i == length(out), use_try = stop_on_error !=
     2L, keep_warning = keep_warning, keep_message = keep_message,
     output_handler = output_handler, include_timing = include_timing)
    where 11: evaluate::evaluate(...)
    where 12: evaluate(code, envir = env, new_device = FALSE, keep_warning = !isFALSE(options$warning),
     keep_message = !isFALSE(options$message), stop_on_error = if (options$error &&
     options$include) 0L else 2L, output_handler = knit_handlers(options$render,
     options))
    where 13: in_dir(input_dir(), evaluate(code, envir = env, new_device = FALSE,
     keep_warning = !isFALSE(options$warning), keep_message = !isFALSE(options$message),
     stop_on_error = if (options$error && options$include) 0L else 2L,
     output_handler = knit_handlers(options$render, options)))
    where 14: block_exec(params)
    where 15: call_block(x)
    where 16: process_group.block(group)
    where 17: process_group(group)
    where 18: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group),
     error = function(e) {
     setwd(wd)
     cat(res, sep = "\n", file = output %n% "")
     message("Quitting from lines ", paste(current_lines(i),
     collapse = "-"), " (", knit_concord$get("infile"),
     ") ")
     })
    where 19: process_file(text, output)
    where 20: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet,
     encoding = encoding)
    where 21: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(),
     ...)
    where 22: vweave_rmarkdown(...)
    where 23: engine$weave(file, quiet = quiet, encoding = enc)
    where 24: doTryCatch(return(expr), name, parentenv, handler)
    where 25: tryCatchOne(expr, names, parentenv, handlers[[1L]])
    where 26: tryCatchList(expr, classes, parentenv, handlers)
    where 27: tryCatch({
     engine$weave(file, quiet = quiet, encoding = enc)
     setwd(startdir)
     output <- find_vignette_product(name, by = "weave", engine = engine)
     if (!have.makefile && vignette_is_tex(output)) {
     texi2pdf(file = output, clean = FALSE, quiet = quiet)
     output <- find_vignette_product(name, by = "texi2pdf",
     engine = engine)
     }
     outputs <- c(outputs, output)
    }, error = function(e) {
     thisOK <<- FALSE
     fails <<- c(fails, file)
     message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s",
     file, conditionMessage(e)))
    })
    where 28: tools:::buildVignettes(dir = "/home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/caretEnsemble.Rcheck/vign_test/caretEnsemble",
     ser_elibs = "/home/hornik/tmp/scratch/RtmpuJuW1s/file19e7105b067f.rds")
    
     --- value of length: 2 type: logical ---
    [1] FALSE TRUE
     --- function from context ---
    function (object, newdata = NULL, ..., verbose = FALSE)
    {
     if (is.null(newdata)) {
     warning("Predicting without new data is not well supported. Attempting to predict on the training data.")
     newdata <- object[[1]]$trainingData
     if (is.null(newdata)) {
     stop("Could not find training data in the first model in the ensemble.")
     }
     }
     if (verbose == TRUE) {
     pboptions(type = "txt", char = "*")
     }
     else if (verbose == FALSE) {
     pboptions(type = "none")
     }
     preds <- pbsapply(object, function(x) {
     type <- x$modelType
     if (type == "Classification") {
     if (x$control$classProbs) {
     caret::predict.train(x, type = "prob", newdata = newdata,
     ...)[, 2]
     }
     else {
     caret::predict.train(x, type = "raw", newdata = newdata,
     ...)
     }
     }
     else if (type == "Regression") {
     caret::predict.train(x, type = "raw", newdata = newdata,
     ...)
     }
     else {
     stop(paste("Unknown model type:", type))
     }
     })
     if (class(preds) != "matrix" & class(preds) != "data.frame") {
     if (class(preds) == "character" | class(preds) == "factor") {
     preds <- as.character(preds)
     }
     preds <- as.matrix(t(preds))
     }
     colnames(preds) <- make.names(sapply(object, function(x) x$method),
     unique = TRUE)
     return(preds)
    }
    <bytecode: 0x5619be7f1728>
    <environment: namespace:caretEnsemble>
     --- function search by body ---
    Function predict.caretList in namespace caretEnsemble has this body.
     ----------- END OF FAILURE REPORT --------------
    Fatal error: the condition has length > 1
Flavor: r-devel-linux-x86_64-debian-gcc