Running ‘testthat.R’ [40s/34s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(DataExplorer)
  > 
  > test_check("DataExplorer")
  ── 1. Error: test maximum categories (@test-plot-bar.r#6)  ─────────────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: expect_message(plot_bar(diamonds, maxcat = 5L)) at testthat/test-plot-bar.r:6
  2: quasi_capture(enquo(object), capture_messages, label = label)
  3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
  4: withCallingHandlers(code, message = function(condition) {
         out$push(condition)
         invokeRestart("muffleMessage")
     })
  5: eval_bare(get_expr(quo), get_env(quo))
  6: plot_bar(diamonds, maxcat = 5L)
  7: plotDataExplorer(plot_obj = plot_list, page_layout = layout, title = title, ggtheme = ggtheme, 
         theme_config = theme_config, facet_wrap_args = list(facet = ~variable, nrow = nrow, 
             ncol = ncol, scales = "free"))
  8: plotDataExplorer.multiple(plot_obj = plot_list, page_layout = layout, title = title, 
         ggtheme = ggtheme, theme_config = theme_config, facet_wrap_args = list(facet = ~variable, 
             nrow = nrow, ncol = ncol, scales = "free"))
  9: capture.output(print(plot_list))
  10: evalVis(expr)
  ...
  18: ggplot_gtable(data)
  19: ggplot_gtable.ggplot_built(data)
  20: layout$render(geom_grobs, data, theme, plot$labels)
  21: f(..., self = self)
  22: self$facet$draw_panels(panels, self$layout, self$panel_scales_x, self$panel_scales_y, 
         self$panel_params, self$coord, data, theme, self$facet_params)
  23: f(...)
  24: render_strips(structure(labels_df, type = "rows"), structure(labels_df, type = "cols"), 
         params$labeller, theme)
  25: build_strip(x, labeller, theme, TRUE)
  26: ggstrip(grobs, theme, element, gp, horizontal, clip = "on")
  27: Summary.unit(structure(c(4.4, 4.4), unit = 8L, class = c("margin", "unit")), na.rm = FALSE)
  
  ── 2. Error: test return object (@test-plot-bar.r#13)  ─────────────────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: plot_bar(diamonds) at testthat/test-plot-bar.r:13
  2: plotDataExplorer(plot_obj = plot_list, page_layout = layout, title = title, ggtheme = ggtheme, 
         theme_config = theme_config, facet_wrap_args = list(facet = ~variable, nrow = nrow, 
             ncol = ncol, scales = "free"))
  3: plotDataExplorer.multiple(plot_obj = plot_list, page_layout = layout, title = title, 
         ggtheme = ggtheme, theme_config = theme_config, facet_wrap_args = list(facet = ~variable, 
             nrow = nrow, ncol = ncol, scales = "free"))
  4: capture.output(print(plot_list))
  5: evalVis(expr)
  6: withVisible(eval(expr, pf))
  7: eval(expr, pf)
  8: eval(expr, pf)
  9: print(plot_list)
  10: print.default(plot_list)
  ...
  13: ggplot_gtable(data)
  14: ggplot_gtable.ggplot_built(data)
  15: layout$render(geom_grobs, data, theme, plot$labels)
  16: f(..., self = self)
  17: self$facet$draw_panels(panels, self$layout, self$panel_scales_x, self$panel_scales_y, 
         self$panel_params, self$coord, data, theme, self$facet_params)
  18: f(...)
  19: render_strips(structure(labels_df, type = "rows"), structure(labels_df, type = "cols"), 
         params$labeller, theme)
  20: build_strip(x, labeller, theme, TRUE)
  21: ggstrip(grobs, theme, element, gp, horizontal, clip = "on")
  22: Summary.unit(structure(c(4.4, 4.4), unit = 8L, class = c("margin", "unit")), na.rm = FALSE)
  
  ── 3. Error: test binary categories (@test-plot-bar.r#30)  ─────────────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: expect_silent(plot_bar(df, with = "a")) at testthat/test-plot-bar.r:30
  2: quasi_capture(enquo(object), evaluate_promise)
  3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
  4: withr::with_output_sink(temp, withCallingHandlers(withVisible(code), warning = handle_warning, 
         message = handle_message))
  5: force(code)
  6: withCallingHandlers(withVisible(code), warning = handle_warning, message = handle_message)
  7: withVisible(code)
  8: eval_bare(get_expr(quo), get_env(quo))
  9: plot_bar(df, with = "a")
  10: plotDataExplorer(plot_obj = plot_list, page_layout = layout, title = title, ggtheme = ggtheme, 
         theme_config = theme_config, facet_wrap_args = list(facet = ~variable, nrow = nrow, 
             ncol = ncol, scales = "free"))
  ...
  21: ggplot_gtable(data)
  22: ggplot_gtable.ggplot_built(data)
  23: layout$render(geom_grobs, data, theme, plot$labels)
  24: f(..., self = self)
  25: self$facet$draw_panels(panels, self$layout, self$panel_scales_x, self$panel_scales_y, 
         self$panel_params, self$coord, data, theme, self$facet_params)
  26: f(...)
  27: render_strips(structure(labels_df, type = "rows"), structure(labels_df, type = "cols"), 
         params$labeller, theme)
  28: build_strip(x, labeller, theme, TRUE)
  29: ggstrip(grobs, theme, element, gp, horizontal, clip = "on")
  30: Summary.unit(structure(c(4.4, 4.4), unit = 8L, class = c("margin", "unit")), na.rm = FALSE)
  
  ── 4. Error: test normal functions (@test-plot-correlation.r#5)  ───────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: expect_silent(plot_correlation(data.frame(a = rnorm(10)))) at testthat/test-plot-correlation.r:5
  2: quasi_capture(enquo(object), evaluate_promise)
  3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
  4: withr::with_output_sink(temp, withCallingHandlers(withVisible(code), warning = handle_warning, 
         message = handle_message))
  5: force(code)
  6: withCallingHandlers(withVisible(code), warning = handle_warning, message = handle_message)
  7: withVisible(code)
  8: eval_bare(get_expr(quo), get_env(quo))
  9: plot_correlation(data.frame(a = rnorm(10)))
  10: plotDataExplorer(plot_obj = output, title = title, ggtheme = ggtheme, theme_config = theme_config)
  ...
  27: pushvpgp(x)
  28: pushgrobvp(x$vp)
  29: pushgrobvp.viewport(x$vp)
  30: pushViewport(vp, recording = FALSE)
  31: lapply(vps, push.vp, recording)
  32: FUN(X[[i]], ...)
  33: push.vp.vpTree(X[[i]], ...)
  34: push.vp(vp$parent, recording)
  35: push.vp.viewport(vp$parent, recording)
  36: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ── 5. Error: test maximum categories for discrete features (@test-plot-correlati
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: expect_message(plot_correlation(diamonds, type = "d", maxcat = 5)) at testthat/test-plot-correlation.r:11
  2: quasi_capture(enquo(object), capture_messages, label = label)
  3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
  4: withCallingHandlers(code, message = function(condition) {
         out$push(condition)
         invokeRestart("muffleMessage")
     })
  5: eval_bare(get_expr(quo), get_env(quo))
  6: plot_correlation(diamonds, type = "d", maxcat = 5)
  7: plotDataExplorer(plot_obj = output, title = title, ggtheme = ggtheme, theme_config = theme_config)
  8: plotDataExplorer.single(plot_obj = output, title = title, ggtheme = ggtheme, theme_config = theme_config)
  9: print(plot_obj)
  10: print.ggplot(plot_obj)
  ...
  24: pushvpgp(x)
  25: pushgrobvp(x$vp)
  26: pushgrobvp.viewport(x$vp)
  27: pushViewport(vp, recording = FALSE)
  28: lapply(vps, push.vp, recording)
  29: FUN(X[[i]], ...)
  30: push.vp.vpTree(X[[i]], ...)
  31: push.vp(vp$parent, recording)
  32: push.vp.viewport(vp$parent, recording)
  33: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ── 6. Error: test return object (@test-plot-correlation.r#21)  ─────────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: plot_correlation(iris) at testthat/test-plot-correlation.r:21
  2: plotDataExplorer(plot_obj = output, title = title, ggtheme = ggtheme, theme_config = theme_config)
  3: plotDataExplorer.single(plot_obj = output, title = title, ggtheme = ggtheme, theme_config = theme_config)
  4: print(plot_obj)
  5: print.ggplot(plot_obj)
  6: ggplot_gtable(data)
  7: ggplot_gtable.ggplot_built(data)
  8: build_guides(plot$scales, plot$layers, plot$mapping, position, theme, plot$guides, 
         plot$labels)
  9: guides_gengrob(gdefs, theme)
  10: lapply(gdefs, guide_gengrob, theme)
  ...
  19: pushvpgp(x)
  20: pushgrobvp(x$vp)
  21: pushgrobvp.viewport(x$vp)
  22: pushViewport(vp, recording = FALSE)
  23: lapply(vps, push.vp, recording)
  24: FUN(X[[i]], ...)
  25: push.vp.vpTree(X[[i]], ...)
  26: push.vp(vp$parent, recording)
  27: push.vp.viewport(vp$parent, recording)
  28: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ── 7. Error: test column names containing spaces (@test-plot-histogram-density.r
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: expect_silent(plot_histogram(df)) at testthat/test-plot-histogram-density.r:5
  2: quasi_capture(enquo(object), evaluate_promise)
  3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
  4: withr::with_output_sink(temp, withCallingHandlers(withVisible(code), warning = handle_warning, 
         message = handle_message))
  5: force(code)
  6: withCallingHandlers(withVisible(code), warning = handle_warning, message = handle_message)
  7: withVisible(code)
  8: eval_bare(get_expr(quo), get_env(quo))
  9: plot_histogram(df)
  10: plotDataExplorer(plot_obj = plot_list, page_layout = layout, title = title, ggtheme = ggtheme, 
         theme_config = theme_config, facet_wrap_args = list(facet = ~variable, nrow = nrow, 
             ncol = ncol, scales = "free"))
  ...
  21: ggplot_gtable(data)
  22: ggplot_gtable.ggplot_built(data)
  23: layout$render(geom_grobs, data, theme, plot$labels)
  24: f(..., self = self)
  25: self$facet$draw_panels(panels, self$layout, self$panel_scales_x, self$panel_scales_y, 
         self$panel_params, self$coord, data, theme, self$facet_params)
  26: f(...)
  27: render_strips(structure(labels_df, type = "rows"), structure(labels_df, type = "cols"), 
         params$labeller, theme)
  28: build_strip(x, labeller, theme, TRUE)
  29: ggstrip(grobs, theme, element, gp, horizontal, clip = "on")
  30: Summary.unit(structure(c(4.4, 4.4), unit = 8L, class = c("margin", "unit")), na.rm = FALSE)
  
  ── 8. Error: test return object (@test-plot-histogram-density.r#10)  ───────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: plot_histogram(iris) at testthat/test-plot-histogram-density.r:10
  2: plotDataExplorer(plot_obj = plot_list, page_layout = layout, title = title, ggtheme = ggtheme, 
         theme_config = theme_config, facet_wrap_args = list(facet = ~variable, nrow = nrow, 
             ncol = ncol, scales = "free"))
  3: plotDataExplorer.multiple(plot_obj = plot_list, page_layout = layout, title = title, 
         ggtheme = ggtheme, theme_config = theme_config, facet_wrap_args = list(facet = ~variable, 
             nrow = nrow, ncol = ncol, scales = "free"))
  4: capture.output(print(plot_list))
  5: evalVis(expr)
  6: withVisible(eval(expr, pf))
  7: eval(expr, pf)
  8: eval(expr, pf)
  9: print(plot_list)
  10: print.default(plot_list)
  ...
  13: ggplot_gtable(data)
  14: ggplot_gtable.ggplot_built(data)
  15: layout$render(geom_grobs, data, theme, plot$labels)
  16: f(..., self = self)
  17: self$facet$draw_panels(panels, self$layout, self$panel_scales_x, self$panel_scales_y, 
         self$panel_params, self$coord, data, theme, self$facet_params)
  18: f(...)
  19: render_strips(structure(labels_df, type = "rows"), structure(labels_df, type = "cols"), 
         params$labeller, theme)
  20: build_strip(x, labeller, theme, TRUE)
  21: ggstrip(grobs, theme, element, gp, horizontal, clip = "on")
  22: Summary.unit(structure(c(4.4, 4.4), unit = 8L, class = c("margin", "unit")), na.rm = FALSE)
  
  ── 9. Error: test binary categories and error messages (@test-plot-histogram-den
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: expect_silent(plot_histogram(sample.int(n = 2L, size = 26L, replace = TRUE), binary_as_factor = FALSE)) at testthat/test-plot-histogram-density.r:33
  2: quasi_capture(enquo(object), evaluate_promise)
  3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
  4: withr::with_output_sink(temp, withCallingHandlers(withVisible(code), warning = handle_warning, 
         message = handle_message))
  5: force(code)
  6: withCallingHandlers(withVisible(code), warning = handle_warning, message = handle_message)
  7: withVisible(code)
  8: eval_bare(get_expr(quo), get_env(quo))
  9: plot_histogram(sample.int(n = 2L, size = 26L, replace = TRUE), binary_as_factor = FALSE)
  10: plotDataExplorer(plot_obj = plot_list, page_layout = layout, title = title, ggtheme = ggtheme, 
         theme_config = theme_config, facet_wrap_args = list(facet = ~variable, nrow = nrow, 
             ncol = ncol, scales = "free"))
  ...
  21: ggplot_gtable(data)
  22: ggplot_gtable.ggplot_built(data)
  23: layout$render(geom_grobs, data, theme, plot$labels)
  24: f(..., self = self)
  25: self$facet$draw_panels(panels, self$layout, self$panel_scales_x, self$panel_scales_y, 
         self$panel_params, self$coord, data, theme, self$facet_params)
  26: f(...)
  27: render_strips(structure(labels_df, type = "rows"), structure(labels_df, type = "cols"), 
         params$labeller, theme)
  28: build_strip(x, labeller, theme, TRUE)
  29: ggstrip(grobs, theme, element, gp, horizontal, clip = "on")
  30: Summary.unit(structure(c(4.4, 4.4), unit = 8L, class = c("margin", "unit")), na.rm = FALSE)
  
  ── 10. Error: test return object (@test-plot-intro.r#4)  ───────────────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: plot_intro(iris) at testthat/test-plot-intro.r:4
  2: plotDataExplorer(plot_obj = output, title = ifelse(is.null(title), paste("Memory Usage:", 
         memory_usage_string), title), ggtheme = ggtheme, theme_config = theme_config)
  3: plotDataExplorer.single(plot_obj = output, title = ifelse(is.null(title), paste("Memory Usage:", 
         memory_usage_string), title), ggtheme = ggtheme, theme_config = theme_config)
  4: print(plot_obj)
  5: print.ggplot(plot_obj)
  6: ggplot_gtable(data)
  7: ggplot_gtable.ggplot_built(data)
  8: build_guides(plot$scales, plot$layers, plot$mapping, position, theme, plot$guides, 
         plot$labels)
  9: guides_gengrob(gdefs, theme)
  10: lapply(gdefs, guide_gengrob, theme)
  ...
  19: pushvpgp(x)
  20: pushgrobvp(x$vp)
  21: pushgrobvp.viewport(x$vp)
  22: pushViewport(vp, recording = FALSE)
  23: lapply(vps, push.vp, recording)
  24: FUN(X[[i]], ...)
  25: push.vp.vpTree(X[[i]], ...)
  26: push.vp(vp$parent, recording)
  27: push.vp.viewport(vp$parent, recording)
  28: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ── 11. Error: test return object (@test-plot-missing.r#4)  ─────────────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: plot_missing(airquality) at testthat/test-plot-missing.r:4
  2: plotDataExplorer(plot_obj = output, title = title, ggtheme = ggtheme, theme_config = theme_config)
  3: plotDataExplorer.single(plot_obj = output, title = title, ggtheme = ggtheme, theme_config = theme_config)
  4: print(plot_obj)
  5: print.ggplot(plot_obj)
  6: ggplot_gtable(data)
  7: ggplot_gtable.ggplot_built(data)
  8: build_guides(plot$scales, plot$layers, plot$mapping, position, theme, plot$guides, 
         plot$labels)
  9: guides_gengrob(gdefs, theme)
  10: lapply(gdefs, guide_gengrob, theme)
  ...
  19: pushvpgp(x)
  20: pushgrobvp(x$vp)
  21: pushgrobvp.viewport(x$vp)
  22: pushViewport(vp, recording = FALSE)
  23: lapply(vps, push.vp, recording)
  24: FUN(X[[i]], ...)
  25: push.vp.vpTree(X[[i]], ...)
  26: push.vp(vp$parent, recording)
  27: push.vp.viewport(vp$parent, recording)
  28: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ── 12. Error: test error (@test-plot-prcomp.r#4)  ──────────────────────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: expect_silent(plot_prcomp(iris)) at testthat/test-plot-prcomp.r:4
  2: quasi_capture(enquo(object), evaluate_promise)
  3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
  4: withr::with_output_sink(temp, withCallingHandlers(withVisible(code), warning = handle_warning, 
         message = handle_message))
  5: force(code)
  6: withCallingHandlers(withVisible(code), warning = handle_warning, message = handle_message)
  7: withVisible(code)
  8: eval_bare(get_expr(quo), get_env(quo))
  9: plot_prcomp(iris)
  10: plotDataExplorer(plot_obj = varexp_plot, title = "% Variance Explained By Principal Components\n(Note: Labels indicate cumulative % explained variance)", 
         ggtheme = ggtheme, theme_config = theme_config)
  ...
  18: preDraw(x)
  19: preDraw.gTree(x)
  20: pushvpgp(x)
  21: pushgrobvp(x$vp)
  22: pushgrobvp.viewport(x$vp)
  23: pushViewport(vp, recording = FALSE)
  24: lapply(vps, push.vp, recording)
  25: FUN(X[[i]], ...)
  26: push.vp.viewport(X[[i]], ...)
  27: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ── 13. Error: test return object (@test-plot-prcomp.r#9)  ──────────────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: plot_prcomp(iris, variance_cap = 1, nrow = 2L, ncol = 2L) at testthat/test-plot-prcomp.r:9
  2: plotDataExplorer(plot_obj = varexp_plot, title = "% Variance Explained By Principal Components\n(Note: Labels indicate cumulative % explained variance)", 
         ggtheme = ggtheme, theme_config = theme_config)
  3: plotDataExplorer.single(plot_obj = varexp_plot, title = "% Variance Explained By Principal Components\n(Note: Labels indicate cumulative % explained variance)", 
         ggtheme = ggtheme, theme_config = theme_config)
  4: print(plot_obj)
  5: print.ggplot(plot_obj)
  6: grid.draw(gtable)
  7: grid.draw.gTree(gtable)
  8: recordGraphics(drawGTree(x), list(x = x), getNamespace("grid"))
  9: drawGTree(x)
  10: preDraw(x)
  11: preDraw.gTree(x)
  12: pushvpgp(x)
  13: pushgrobvp(x$vp)
  14: pushgrobvp.viewport(x$vp)
  15: pushViewport(vp, recording = FALSE)
  16: lapply(vps, push.vp, recording)
  17: FUN(X[[i]], ...)
  18: push.vp.viewport(X[[i]], ...)
  19: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ── 14. Error: test return object (@test-plot-qq.r#5)  ──────────────────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: plot_qq(df, nrow = 2L, ncol = 2L) at testthat/test-plot-qq.r:5
  2: plotDataExplorer(plot_obj = plot_list, page_layout = layout, title = title, ggtheme = ggtheme, 
         theme_config = theme_config, facet_wrap_args = list(facet = ~variable, nrow = nrow, 
             ncol = ncol, scales = "free_y"))
  3: plotDataExplorer.multiple(plot_obj = plot_list, page_layout = layout, title = title, 
         ggtheme = ggtheme, theme_config = theme_config, facet_wrap_args = list(facet = ~variable, 
             nrow = nrow, ncol = ncol, scales = "free_y"))
  4: capture.output(print(plot_list))
  5: evalVis(expr)
  6: withVisible(eval(expr, pf))
  7: eval(expr, pf)
  8: eval(expr, pf)
  9: print(plot_list)
  10: print.default(plot_list)
  ...
  13: ggplot_gtable(data)
  14: ggplot_gtable.ggplot_built(data)
  15: layout$render(geom_grobs, data, theme, plot$labels)
  16: f(..., self = self)
  17: self$facet$draw_panels(panels, self$layout, self$panel_scales_x, self$panel_scales_y, 
         self$panel_params, self$coord, data, theme, self$facet_params)
  18: f(...)
  19: render_strips(structure(labels_df, type = "rows"), structure(labels_df, type = "cols"), 
         params$labeller, theme)
  20: build_strip(x, labeller, theme, TRUE)
  21: ggstrip(grobs, theme, element, gp, horizontal, clip = "on")
  22: Summary.unit(structure(c(4.4, 4.4), unit = 8L, class = c("margin", "unit")), na.rm = FALSE)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 157 SKIPPED: 7 FAILED: 14
  1. Error: test maximum categories (@test-plot-bar.r#6) 
  2. Error: test return object (@test-plot-bar.r#13) 
  3. Error: test binary categories (@test-plot-bar.r#30) 
  4. Error: test normal functions (@test-plot-correlation.r#5) 
  5. Error: test maximum categories for discrete features (@test-plot-correlation.r#11) 
  6. Error: test return object (@test-plot-correlation.r#21) 
  7. Error: test column names containing spaces (@test-plot-histogram-density.r#5) 
  8. Error: test return object (@test-plot-histogram-density.r#10) 
  9. Error: test binary categories and error messages (@test-plot-histogram-density.r#33) 
  1. ...
  
  Error: testthat unit tests failed
  Execution halted