Running 'testthat.R' [9s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(tree.interpreter)
  > 
  > test_check("tree.interpreter")
  
  error: Cube::subcube(): indices out of bounds or incorrectly used
  -- 1. Error: MDI works for ranger & classification tree (@test-MDI-class.R#16)  
  Cube::subcube(): indices out of bounds or incorrectly used
  Backtrace:
   1. tree.interpreter::MDI(tidy.RF, iris[, -5], iris[, 5])
   3. base::lapply(...)
   4. tree.interpreter:::FUN(X[[i]], ...)
   5. tree.interpreter::MDITree(tidy.RF, tree, trainX, trainY)
   6. tree.interpreter::featureContribTree(tidy.RF, tree, X.inbag)
   7. tree.interpreter:::featureContribTreeCpp(tidy.RF, tree - 1, X)
  
  
  error: Cube::subcube(): indices out of bounds or incorrectly used
  -- 2. Error: MDIoob works for ranger & classification tree (@test-MDI-class.R#59
  Cube::subcube(): indices out of bounds or incorrectly used
  Backtrace:
   1. tree.interpreter::MDIoob(tidy.RF, iris[, -5], iris[, 5])
   3. base::lapply(...)
   4. tree.interpreter:::FUN(X[[i]], ...)
   5. tree.interpreter::MDIoobTree(tidy.RF, tree, trainX, trainY)
   6. tree.interpreter::featureContribTree(tidy.RF, tree, X.oob)
   7. tree.interpreter:::featureContribTreeCpp(tidy.RF, tree - 1, X)
  
  
  error: Cube::subcube(): indices out of bounds or incorrectly used
  -- 3. Error: MDI works for ranger & regression tree (@test-MDI-reg.R#10)  ------
  Cube::subcube(): indices out of bounds or incorrectly used
  Backtrace:
   1. tree.interpreter::MDITree(...)
   2. tree.interpreter::featureContribTree(tidy.RF, tree, X.inbag)
   3. tree.interpreter:::featureContribTreeCpp(tidy.RF, tree - 1, X)
  
  
  error: Cube::subcube(): indices out of bounds or incorrectly used
  -- 4. Error: MDIoob works for ranger & regression tree (@test-MDI-reg.R#54)  ---
  Cube::subcube(): indices out of bounds or incorrectly used
  Backtrace:
   1. tree.interpreter::MDIoobTree(...)
   2. tree.interpreter::featureContribTree(tidy.RF, tree, X.oob)
   3. tree.interpreter:::featureContribTreeCpp(tidy.RF, tree - 1, X)
  
  
  error: Cube::subcube(): indices out of bounds or incorrectly used
  -- 5. Error: featureContrib works for ranger & classification tree (@test-featur
  Cube::subcube(): indices out of bounds or incorrectly used
  Backtrace:
   1. tree.interpreter::featureContrib(tidy.RF, iris[-trainID, -5])
   3. base::lapply(...)
   4. tree.interpreter:::FUN(X[[i]], ...)
   5. tree.interpreter::featureContribTree(tidy.RF, tree, X)
   6. tree.interpreter:::featureContribTreeCpp(tidy.RF, tree - 1, X)
  
  
  error: Cube::subcube(): indices out of bounds or incorrectly used
  -- 6. Error: featureContrib works for ranger & regression tree (@test-featureCon
  Cube::subcube(): indices out of bounds or incorrectly used
  Backtrace:
   1. tree.interpreter::featureContrib(tidy.RF, mtcars[-trainID, -1])
   3. base::lapply(...)
   4. tree.interpreter:::FUN(X[[i]], ...)
   5. tree.interpreter::featureContribTree(tidy.RF, tree, X)
   6. tree.interpreter:::featureContribTreeCpp(tidy.RF, tree - 1, X)
  
  
  error: Cube::subcube(): indices out of bounds or incorrectly used
  -- 7. Error: featureContrib retains order of features for ranger (@test-featureC
  Cube::subcube(): indices out of bounds or incorrectly used
  Backtrace:
   1. tree.interpreter::featureContrib(tidy.RF, dummy[, -(3:4)])
   3. base::lapply(...)
   4. tree.interpreter:::FUN(X[[i]], ...)
   5. tree.interpreter::featureContribTree(tidy.RF, tree, X)
   6. tree.interpreter:::featureContribTreeCpp(tidy.RF, tree - 1, X)
  
  -- 8. Failure: tidyRF works for ranger & classification tree (@test-tidyRF.R#17)
  min(sapply(tidy.RF$node.sizes, min)) is not more than 1. Difference: -1
  
  -- 9. Failure: tidyRF works for ranger & regression tree (@test-tidyRF.R#49)  --
  min(sapply(tidy.RF$node.sizes, min)) is not more than 1. Difference: -1
  
  -- 10. Failure: tidyRF works for ranger when keep.inbag = FALSE (@test-tidyRF.R#
  min(sapply(tidy.RF$node.sizes, min)) is not more than 1. Difference: -1
  
  == testthat results  ===========================================================
  [ OK: 94 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 10 ]
  1.  Error: MDI works for ranger & classification tree (@test-MDI-class.R#16) 
  2.  Error: MDIoob works for ranger & classification tree (@test-MDI-class.R#59) 
  3.  Error: MDI works for ranger & regression tree (@test-MDI-reg.R#10) 
  4.  Error: MDIoob works for ranger & regression tree (@test-MDI-reg.R#54) 
  5.  Error: featureContrib works for ranger & classification tree (@test-featureContrib-class.R#10) 
  6.  Error: featureContrib works for ranger & regression tree (@test-featureContrib-reg.R#10) 
  7.  Error: featureContrib retains order of features for ranger (@test-featureContrib-reg.R#40) 
  8.  Failure: tidyRF works for ranger & classification tree (@test-tidyRF.R#17) 
  9.  Failure: tidyRF works for ranger & regression tree (@test-tidyRF.R#49) 
  10. Failure: tidyRF works for ranger when keep.inbag = FALSE (@test-tidyRF.R#82) 
  
  Error: testthat unit tests failed
  Execution halted