Running 'testthat.R' [48s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(checkmate)
  > library(iml)
  > 
  > test_check("iml")
  -- 1. Error: (unknown) (@test-Predictor.R#6)  ----------------------------------
  package or namespace load failed for 'caret':
   Function found when exporting methods from the namespace 'dimRed' which is not S4 generic: 'nrow'
  1: library("caret") at testthat/test-Predictor.R:6
  2: tryCatch({
         attr(package, "LibPath") <- which.lib.loc
         ns <- loadNamespace(package, lib.loc)
         env <- attachNamespace(ns, pos = pos, deps)
     }, error = function(e) {
         P <- if (!is.null(cc <- conditionCall(e))) 
             paste(" in", deparse(cc)[1L])
         else ""
         msg <- gettextf("package or namespace load failed for %s%s:\n %s", sQuote(package), 
             P, conditionMessage(e))
         if (logical.return) 
             message(paste("Error:", msg), domain = NA)
         else stop(msg, call. = FALSE, domain = NA)
     })
  3: tryCatchList(expr, classes, parentenv, handlers)
  4: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  5: value[[3L]](cond)
  6: stop(msg, call. = FALSE, domain = NA)
  
  -- 2. Error: (unknown) (@test-createPredictionFunction.R#6)  -------------------
  package or namespace load failed for 'caret':
   Function found when exporting methods from the namespace 'dimRed' which is not S4 generic: 'nrow'
  1: library("caret") at testthat/test-createPredictionFunction.R:6
  2: tryCatch({
         attr(package, "LibPath") <- which.lib.loc
         ns <- loadNamespace(package, lib.loc)
         env <- attachNamespace(ns, pos = pos, deps)
     }, error = function(e) {
         P <- if (!is.null(cc <- conditionCall(e))) 
             paste(" in", deparse(cc)[1L])
         else ""
         msg <- gettextf("package or namespace load failed for %s%s:\n %s", sQuote(package), 
             P, conditionMessage(e))
         if (logical.return) 
             message(paste("Error:", msg), domain = NA)
         else stop(msg, call. = FALSE, domain = NA)
     })
  3: tryCatchList(expr, classes, parentenv, handlers)
  4: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  5: value[[3L]](cond)
  6: stop(msg, call. = FALSE, domain = NA)
  
  -- 3. Error: classificaton (@test-inferTask.R#18)  -----------------------------
  unused arguments (method = "knn", preProcess = c("center", "scale"), tuneLength = 2, trControl = trainControl(method = "cv"))
  1: .handleSimpleError(function (e) 
     {
         handled <<- TRUE
         test_error <<- e
         options(expressions = expressions_opt_new)
         on.exit(options(expressions = expressions_opt), add = TRUE)
         e$expectation_calls <- frame_calls(11, 2)
         test_error <<- e
         register_expectation(e)
         e$handled <- TRUE
         test_error <<- e
     }, "unused arguments (method = \"knn\", preProcess = c(\"center\", \"scale\"), tuneLength = 2, trControl = trainControl(method = \"cv\"))", 
         base::quote(train(TrainData, TrainClasses, method = "knn", preProcess = c("center", 
             "scale"), tuneLength = 2, trControl = trainControl(method = "cv")))) at testthat/test-inferTask.R:18
  2: eval(code, test_env)
  
  -- 4. Error: regression (@test-inferTask.R#42)  --------------------------------
  unused arguments (data = cars, method = "lm")
  1: .handleSimpleError(function (e) 
     {
         handled <<- TRUE
         test_error <<- e
         options(expressions = expressions_opt_new)
         on.exit(options(expressions = expressions_opt), add = TRUE)
         e$expectation_calls <- frame_calls(11, 2)
         test_error <<- e
         register_expectation(e)
         e$handled <- TRUE
         test_error <<- e
     }, "unused arguments (data = cars, method = \"lm\")", base::quote(train(dist ~ ., 
         data = cars, method = "lm"))) at testthat/test-inferTask.R:42
  2: eval(code, test_env)
  
  == testthat results  ===========================================================
  OK: 429 SKIPPED: 0 FAILED: 4
  1. Error: (unknown) (@test-Predictor.R#6) 
  2. Error: (unknown) (@test-createPredictionFunction.R#6) 
  3. Error: classificaton (@test-inferTask.R#18) 
  4. Error: regression (@test-inferTask.R#42) 
  
  Error: testthat unit tests failed
  Execution halted