Running ‘testthat.R’ [32s/34s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(DALEX)
  Welcome to DALEX (version: 0.3.0).
  This is a plain DALEX. Use 'install_dependencies()' to get all required packages.
  > 
  > test_check("DALEX")
  randomForest 4.6-14
  Type rfNews() to see new features/changes/bug fixes.
  ── 1. Error: Output format - plot (@test_variable_response.R#37)  ──────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: expect_is(plot(vr_factor_rf, vr_factor_lm), "gg") at testthat/test_variable_response.R:37
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: plot(vr_factor_rf, vr_factor_lm)
  5: plot.variable_response_explainer(vr_factor_rf, vr_factor_lm)
  6: plot.variable_response_factor_explainer(x, ...)
  7: lapply(fex, function(fm) {
         colorsDf <- factorMerger::getOptimalPartitionDf(fm, "GIC", 2)
         mergingPathPlot <- factorMerger::plotTree(fm, statistic = "loglikelihood", nodesSpacing = "equidistant", 
             title = fm$label[1], alpha = 0.5, subtitle = "", color = TRUE, colorsDf = colorsDf, 
             markBestModel = FALSE, markStars = TRUE, clusterSplit = clusterSplit, palette = NULL, 
             panelGrid = FALSE) + scale_x_continuous("", breaks = NULL)
         responsePlot <- factorMerger::plotResponse(fm, "boxplot", TRUE, clusterSplit, 
             NULL) + ggtitle("Partial Group Predictions")
         ggpubr::ggarrange(mergingPathPlot, ncol = 1, align = "h", widths = c(2))
     })
  8: FUN(X[[i]], ...)
  9: ggpubr::ggarrange(mergingPathPlot, ncol = 1, align = "h", widths = c(2))
  10: purrr::map(plots, .plot_grid, ncol = ncol, nrow = nrow, labels = labels, label_size = .lab$size, 
         label_fontfamily = .lab$family, label_fontface = .lab$face, label_colour = .lab$color, 
         label_x = .lab$label.x, label_y = .lab$label.y, hjust = .lab$hjust, vjust = .lab$vjust, 
         align = align, rel_widths = widths, rel_heights = heights, legend = legend, common.legend.grob = leg)
  11: .f(.x[[i]], ...)
  12: cowplot::plot_grid(plotlist = plotlist, ...)
  13: align_plots(plotlist = plots, align = align, axis = axis)
  14: do.call(grid::unit.pmax, lapply(grobs, function(x) {
         x$heights
     }))
  15: (function (...) 
     {
         pSummary(..., op = "max")
     })(structure(list(5.5, list(0, NULL, 1L), list(1, structure(list(widths = structure(1, unit = 5L, class = c("simpleUnit", 
     "unit")), heights = structure(list(0, list(1, structure(list(list(1, structure(list(
         label = "randomForest", x = structure(0, unit = 0L, class = c("simpleUnit", "unit"
         )), y = structure(1, unit = 0L, class = c("simpleUnit", "unit")), just = "centre", 
         hjust = 0, vjust = 1, rot = 0, check.overlap = FALSE, name = "GRID.text.36", 
         gp = structure(list(fontsize = 18, col = "black", fontfamily = "", lineheight = 0.9, 
             font = c(plain = 1L)), class = "gpar"), vp = NULL), class = c("text", "grob", 
     "gDesc")), 22L), list(0.0366666666666667, NULL, 2L)), class = "unit"), 201L), 5.5), class = "unit"), 
         name = "plot.title..titleGrob.38", gp = NULL, vp = structure(list(parent = structure(list(
             x = structure(0.5, unit = 0L, class = c("simpleUnit", "unit")), y = structure(0.5, unit = 0L, class = c("simpleUnit", 
             "unit")), width = structure(1, unit = 0L, class = c("simpleUnit", "unit")), 
             height = structure(1, unit = 0L, class = c("simpleUnit", "unit")), justification = "centre", 
             gp = structure(list(fontsize = 18, col = "black", fontfamily = "", lineheight = 0.9, 
                 font = c(plain = 1L)), class = "gpar"), clip = FALSE, xscale = c(0, 1
             ), yscale = c(0, 1), angle = 0, layout = structure(list(nrow = 3L, ncol = 1L, 
                 widths = structure(1, unit = 5L, class = c("simpleUnit", "unit")), heights = structure(list(
                     0, list(1, structure(list(list(1, structure(list(label = "randomForest", 
                       x = structure(0, unit = 0L, class = c("simpleUnit", "unit")), y = structure(1, unit = 0L, class = c("simpleUnit", 
                       "unit")), just = "centre", hjust = 0, vjust = 1, rot = 0, check.overlap = FALSE, 
                       name = "GRID.text.36", gp = structure(list(fontsize = 18, col = "black", 
                         fontfamily = "", lineheight = 0.9, font = c(plain = 1L)), class = "gpar"), 
                       vp = NULL), class = c("text", "grob", "gDesc")), 22L), list(0.0366666666666667, 
                       NULL, 2L)), class = "unit"), 201L), 5.5), class = "unit"), respect = FALSE, 
                 valid.respect = 0L, respect.mat = structure(c(0L, 0L, 0L), .Dim = c(3L, 
                 1L)), just = "centre", valid.just = c(0.5, 0.5)), class = "layout"), 
             layout.pos.row = NULL, layout.pos.col = NULL, valid.just = c(0.5, 0.5), valid.pos.row = NULL, 
             valid.pos.col = NULL, name = "GRID.VP.6"), class = "viewport"), children = structure(list(
             structure(list(x = structure(0.5, unit = 0L, class = c("simpleUnit", "unit"
             )), y = structure(0.5, unit = 0L, class = c("simpleUnit", "unit")), width = structure(1, unit = 0L, class = c("simpleUnit", 
             "unit")), height = structure(1, unit = 0L, class = c("simpleUnit", "unit"
             )), justification = "centre", gp = structure(list(), class = "gpar"), clip = FALSE, 
                 xscale = c(0, 1), yscale = c(0, 1), angle = 0, layout = NULL, layout.pos.row = c(2L, 
                 2L), layout.pos.col = NULL, valid.just = c(0.5, 0.5), valid.pos.row = c(2L, 
                 2L), valid.pos.col = NULL, name = "GRID.VP.7"), class = "viewport")), class = c("vpList", 
         "viewport"))), class = c("vpTree", "viewport")), children = structure(list(GRID.text.36 = structure(list(
             label = "randomForest", x = structure(0, unit = 0L, class = c("simpleUnit", 
             "unit")), y = structure(1, unit = 0L, class = c("simpleUnit", "unit")), just = "centre", 
             hjust = 0, vjust = 1, rot = 0, check.overlap = FALSE, name = "GRID.text.36", 
             gp = structure(list(fontsize = 18, col = "black", fontfamily = "", lineheight = 0.9, 
                 font = c(plain = 1L)), class = "gpar"), vp = NULL), class = c("text", 
         "grob", "gDesc"))), class = "gList"), childrenOrder = "GRID.text.36"), class = c("titleGrob", 
     "gTree", "grob", "gDesc")), 22L), list(1, structure(list(widths = structure(1, unit = 5L, class = c("simpleUnit", 
     "unit")), heights = structure(list(0, list(1, structure(list(list(1, structure(list(
         label = "", x = structure(0, unit = 0L, class = c("simpleUnit", "unit")), y = structure(1, unit = 0L, class = c("simpleUnit", 
         "unit")), just = "centre", hjust = 0, vjust = 1, rot = 0, check.overlap = FALSE, 
         name = "GRID.text.39", gp = structure(list(fontsize = 12, col = "black", fontfamily = "", 
             lineheight = 0.9, font = c(plain = 1L)), class = "gpar"), vp = NULL), class = c("text", 
     "grob", "gDesc")), 22L), list(0.0366666666666667, NULL, 2L)), class = "unit"), 201L), 
         5.5), class = "unit"), name = "plot.subtitle..titleGrob.41", gp = NULL, vp = structure(list(
         parent = structure(list(x = structure(0.5, unit = 0L, class = c("simpleUnit", 
         "unit")), y = structure(0.5, unit = 0L, class = c("simpleUnit", "unit")), width = structure(1, unit = 0L, class = c("simpleUnit", 
         "unit")), height = structure(1, unit = 0L, class = c("simpleUnit", "unit")), 
             justification = "centre", gp = structure(list(fontsize = 12, col = "black", 
                 fontfamily = "", lineheight = 0.9, font = c(plain = 1L)), class = "gpar"), 
             clip = FALSE, xscale = c(0, 1), yscale = c(0, 1), angle = 0, layout = structure(list(
                 nrow = 3L, ncol = 1L, widths = structure(1, unit = 5L, class = c("simpleUnit", 
                 "unit")), heights = structure(list(0, list(1, structure(list(list(1, 
                     structure(list(label = "", x = structure(0, unit = 0L, class = c("simpleUnit", 
                     "unit")), y = structure(1, unit = 0L, class = c("simpleUnit", "unit"
                     )), just = "centre", hjust = 0, vjust = 1, rot = 0, check.overlap = FALSE, 
                       name = "GRID.text.39", gp = structure(list(fontsize = 12, col = "black", 
                         fontfamily = "", lineheight = 0.9, font = c(plain = 1L)), class = "gpar"), 
                       vp = NULL), class = c("text", "grob", "gDesc")), 22L), list(0.0366666666666667, 
                     NULL, 2L)), class = "unit"), 201L), 5.5), class = "unit"), respect = FALSE, 
                 valid.respect = 0L, respect.mat = structure(c(0L, 0L, 0L), .Dim = c(3L, 
                 1L)), just = "centre", valid.just = c(0.5, 0.5)), class = "layout"), 
             layout.pos.row = NULL, layout.pos.col = NULL, valid.just = c(0.5, 0.5), valid.pos.row = NULL, 
             valid.pos.col = NULL, name = "GRID.VP.8"), class = "viewport"), children = structure(list(
             structure(list(x = structure(0.5, unit = 0L, class = c("simpleUnit", "unit"
             )), y = structure(0.5, unit = 0L, class = c("simpleUnit", "unit")), width = structure(1, unit = 0L, class = c("simpleUnit", 
             "unit")), height = structure(1, unit = 0L, class = c("simpleUnit", "unit"
             )), justification = "centre", gp = structure(list(), class = "gpar"), clip = FALSE, 
                 xscale = c(0, 1), yscale = c(0, 1), angle = 0, layout = NULL, layout.pos.row = c(2L, 
                 2L), layout.pos.col = NULL, valid.just = c(0.5, 0.5), valid.pos.row = c(2L, 
                 2L), valid.pos.col = NULL, name = "GRID.VP.9"), class = "viewport")), class = c("vpList", 
         "viewport"))), class = c("vpTree", "viewport")), children = structure(list(GRID.text.39 = structure(list(
         label = "", x = structure(0, unit = 0L, class = c("simpleUnit", "unit")), y = structure(1, unit = 0L, class = c("simpleUnit", 
         "unit")), just = "centre", hjust = 0, vjust = 1, rot = 0, check.overlap = FALSE, 
         name = "GRID.text.39", gp = structure(list(fontsize = 12, col = "black", fontfamily = "", 
             lineheight = 0.9, font = c(plain = 1L)), class = "gpar"), vp = NULL), class = c("text", 
     "grob", "gDesc"))), class = "gList"), childrenOrder = "GRID.text.39"), class = c("titleGrob", 
     "gTree", "grob", "gDesc")), 22L), list(0, NULL, 1L), list(0, NULL, 1L), list(1, NULL, 
         5L), list(0, NULL, 1L), list(1, structure(list(widths = structure(1, unit = 5L, class = c("simpleUnit", 
     "unit")), heights = structure(list(2.75, list(1, structure(list(list(1, structure(list(
         label = "", x = structure(0.5, unit = 0L, class = c("simpleUnit", "unit")), y = structure(1, unit = 0L, class = c("simpleUnit", 
         "unit")), just = "centre", hjust = 0.5, vjust = 1, rot = 0, check.overlap = FALSE, 
         name = "GRID.text.32", gp = structure(list(fontsize = 11, col = "black", fontfamily = "", 
             lineheight = 0.9, font = c(plain = 1L)), class = "gpar"), vp = NULL), class = c("text", 
     "grob", "gDesc")), 22L), list(0.0366666666666667, NULL, 2L)), class = "unit"), 201L), 
         0), class = "unit"), name = "axis.title.x.bottom..titleGrob.34", gp = NULL, vp = structure(list(
         parent = structure(list(x = structure(0.5, unit = 0L, class = c("simpleUnit", 
         "unit")), y = structure(0.5, unit = 0L, class = c("simpleUnit", "unit")), width = structure(1, unit = 0L, class = c("simpleUnit", 
         "unit")), height = structure(1, unit = 0L, class = c("simpleUnit", "unit")), 
             justification = "centre", gp = structure(list(fontsize = 11, col = "black", 
                 fontfamily = "", lineheight = 0.9, font = c(plain = 1L)), class = "gpar"), 
             clip = FALSE, xscale = c(0, 1), yscale = c(0, 1), angle = 0, layout = structure(list(
                 nrow = 3L, ncol = 1L, widths = structure(1, unit = 5L, class = c("simpleUnit", 
                 "unit")), heights = structure(list(2.75, list(1, structure(list(list(
                     1, structure(list(label = "", x = structure(0.5, unit = 0L, class = c("simpleUnit", 
                     "unit")), y = structure(1, unit = 0L, class = c("simpleUnit", "unit"
                     )), just = "centre", hjust = 0.5, vjust = 1, rot = 0, check.overlap = FALSE, 
                       name = "GRID.text.32", gp = structure(list(fontsize = 11, col = "black", 
                         fontfamily = "", lineheight = 0.9, font = c(plain = 1L)), class = "gpar"), 
                       vp = NULL), class = c("text", "grob", "gDesc")), 22L), list(0.0366666666666667, 
                     NULL, 2L)), class = "unit"), 201L), 0), class = "unit"), respect = FALSE, 
                 valid.respect = 0L, respect.mat = structure(c(0L, 0L, 0L), .Dim = c(3L, 
                 1L)), just = "centre", valid.just = c(0.5, 0.5)), class = "layout"), 
             layout.pos.row = NULL, layout.pos.col = NULL, valid.just = c(0.5, 0.5), valid.pos.row = NULL, 
             valid.pos.col = NULL, name = "GRID.VP.4"), class = "viewport"), children = structure(list(
             structure(list(x = structure(0.5, unit = 0L, class = c("simpleUnit", "unit"
             )), y = structure(0.5, unit = 0L, class = c("simpleUnit", "unit")), width = structure(1, unit = 0L, class = c("simpleUnit", 
             "unit")), height = structure(1, unit = 0L, class = c("simpleUnit", "unit"
             )), justification = "centre", gp = structure(list(), class = "gpar"), clip = FALSE, 
                 xscale = c(0, 1), yscale = c(0, 1), angle = 0, layout = NULL, layout.pos.row = c(2L, 
                 2L), layout.pos.col = NULL, valid.just = c(0.5, 0.5), valid.pos.row = c(2L, 
                 2L), valid.pos.col = NULL, name = "GRID.VP.5"), class = "viewport")), class = c("vpList", 
         "viewport"))), class = c("vpTree", "viewport")), children = structure(list(GRID.text.32 = structure(list(
         label = "", x = structure(0.5, unit = 0L, class = c("simpleUnit", "unit")), y = structure(1, unit = 0L, class = c("simpleUnit", 
         "unit")), just = "centre", hjust = 0.5, vjust = 1, rot = 0, check.overlap = FALSE, 
         name = "GRID.text.32", gp = structure(list(fontsize = 11, col = "black", fontfamily = "", 
             lineheight = 0.9, font = c(plain = 1L)), class = "gpar"), vp = NULL), class = c("text", 
     "grob", "gDesc"))), class = "gList"), childrenOrder = "GRID.text.32"), class = c("titleGrob", 
     "gTree", "grob", "gDesc")), 22L), list(0, NULL, 1L), list(0, NULL, 8L), 5.5), class = "unit"))
  16: pSummary(..., op = "max")
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 31 SKIPPED: 0 FAILED: 1
  1. Error: Output format - plot (@test_variable_response.R#37) 
  
  Error: testthat unit tests failed
  In addition: Warning message:
  In randomForest.default(m, y, ...) :
    The response has five or fewer unique values.  Are you sure you want to do regression?
  Execution halted