Running 'testthat.R' [8s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(localModel)
  > library(DALEX)
  Welcome to DALEX (version: 1.0.1).
  Find examples and detailed introduction at: https://pbiecek.github.io/ema/
  Additional features will be available after installation of: iBreakDown, ggpubr.
  Use 'install_dependencies()' to get all suggested dependencies
  > library(randomForest)
  randomForest 4.6-14
  Type rfNews() to see new features/changes/bug fixes.
  > 
  > data('HR')
  > data('apartments')
  > 
  > m_rf_hr <- randomForest(status ~., data = HR[1:500, ], ntree = 10)
  > m_rf_ap <- randomForest(m2.price ~., data = apartments[1:500, ], ntree = 10)
  > 
  > hr_explainer <- suppressWarnings(explain(m_rf_hr, HR[1:500, ], verbose = FALSE)) 
  > ap_explainer <- explain(m_rf_ap, apartments[1:500, ], verbose = FALSE)
  > 
  > local_model_explainer_hr <- individual_surrogate_model(hr_explainer,
  +                                                        HR[5, -6],
  +                                                        size = 50,
  +                                                        seed = 17)
  > local_model_explainer_ap <- individual_surrogate_model(ap_explainer,
  +                                                        apartments[5, -1],
  +                                                        size = 50,
  +                                                        seed = 17)
  > 
  > test_check("localModel")
  -- 1. Error: Function works with single- and multi-column output  --------------
  need at least two non-NA values to interpolate
  Backtrace:
    1. testthat::expect_output(...)
   10. localModel::individual_surrogate_model(...)
   11. base::lapply(...)
   12. localModel:::FUN(X[[i]], ...)
   13. localModel:::single_column_surrogate(...)
   14. glmnet::cv.glmnet(...)
   15. glmnet:::cv.glmnet.raw(...)
   17. glmnet:::buildPredmat.default(...)
   21. glmnet::predict.glmnet(...)
   22. glmnet:::lambda.interp(lambda, s)
   23. stats::approx(lambda, seq(lambda), sfrac)
  
  -- 2. Error: Reproducibility (@test_main.R#16)  --------------------------------
  need at least two non-NA values to interpolate
  Backtrace:
    1. testthat::expect_false(...)
    4. localModel::individual_surrogate_model(...)
    5. base::lapply(...)
    6. localModel:::FUN(X[[i]], ...)
    7. localModel:::single_column_surrogate(...)
    8. glmnet::cv.glmnet(...)
    9. glmnet:::cv.glmnet.raw(...)
   11. glmnet:::buildPredmat.default(...)
   15. glmnet::predict.glmnet(...)
   16. glmnet:::lambda.interp(lambda, s)
   17. stats::approx(lambda, seq(lambda), sfrac)
  
  == testthat results  ===========================================================
  [ OK: 13 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 2 ]
  1. Error: Function works with single- and multi-column output 
  2. Error: Reproducibility (@test_main.R#16) 
  
  Error: testthat unit tests failed
  Execution halted