Running ‘testthat.R’ [4s/6s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(treemapify)
  > 
  > test_check("treemapify")
  ── 1. Error: geoms work with basic parameters (@test_geoms.R#4)  ───────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: expect_silent({
         p <- ggplot2::ggplot(G20, ggplot2::aes(fill = hdi, area = gdp_mil_usd, subgroup = econ_classification, 
             subgroup2 = hemisphere, subgroup3 = region, label = country)) + geom_treemap(layout = "scol", 
             start = "bottomright") + geom_treemap_text(grow = T, place = "top", fontface = "bold", 
             reflow = F, layout = "srow", start = "bottomright") + geom_treemap_subgroup_border(linetype = "dashed", 
             layout = "squarified", start = "bottomright") + geom_treemap_subgroup2_border(linetype = "dashed", 
             layout = "fixed", start = "bottomright") + geom_treemap_subgroup3_border(linetype = "dashed", 
             layout = "fixed", start = "bottomright") + geom_treemap_subgroup_text(grow = F, 
             place = "bottomleft", size = 10, reflow = T, layout = "srow", start = "bottomright") + 
             geom_treemap_subgroup2_text(grow = F, place = "bottomleft", size = 10, reflow = T, 
                 layout = "scol", start = "bottomright") + geom_treemap_subgroup3_text(grow = F, 
             place = "bottomleft", size = 10, reflow = T, layout = "scol", start = "bottomright") + 
             ggplot2::facet_grid(econ_classification ~ region) + ggplot2::scale_colour_gradient(low = "red", 
             high = "green")
         print(p)
     }) at testthat/test_geoms.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: print(p) at testthat/test_geoms.R:63
  10: print.ggplot(p)
  11: ggplot_gtable(data)
  12: ggplot_gtable.ggplot_built(data)
  13: layout$render(geom_grobs, data, theme, plot$labels)
  14: f(..., self = self)
  15: 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)
  16: f(...)
  17: render_strips(col_vars, row_vars, params$labeller, theme)
  18: build_strip(x, labeller, theme, TRUE)
  19: ggstrip(grobs, theme, element, gp, horizontal, clip = "on")
  20: Summary.unit(structure(c(4.4, 4.4), unit = 8L, class = c("margin", "unit")), na.rm = FALSE)
  
  ── 2. Error: geom_treemap_subgroup_text works with a colour aesthetic (@test_geo
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: expect_silent({
         p <- ggplot2::ggplot(G20, ggplot2::aes(area = gdp_mil_usd, fill = hdi, subgroup = hemisphere, 
             subgroup2 = region, subgroup3 = country)) + treemapify::geom_treemap() + 
             treemapify::geom_treemap_subgroup3_text(ggplot2::aes(colour = region))
         print(p)
     }) at testthat/test_geoms.R:68
  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: print(p) at testthat/test_geoms.R:72
  10: print.ggplot(p)
  ...
  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)
  
  ── 3. Error: plots look the way they should (@test_plots.R#4)  ─────────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: vdiffr::expect_doppelganger("Basic treemap", {
         ggplot2::ggplot(G20, ggplot2::aes(area = gdp_mil_usd, fill = hdi, label = country)) + 
             geom_treemap() + geom_treemap_text()
     }) at testthat/test_plots.R:4
  2: writer(fig, testcase, title)
  3: print_plot(plot, title)
  4: print_plot.ggplot(plot, title)
  5: print(p)
  6: print.ggplot(p)
  7: ggplot_gtable(data)
  8: ggplot_gtable.ggplot_built(data)
  9: build_guides(plot$scales, plot$layers, plot$mapping, position, theme, plot$guides, 
         plot$labels)
  10: guides_gengrob(gdefs, theme)
  ...
  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.vpTree(X[[i]], ...)
  27: push.vp(vp$parent, recording)
  28: push.vp.viewport(vp$parent, recording)
  29: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 23 SKIPPED: 0 FAILED: 3
  1. Error: geoms work with basic parameters (@test_geoms.R#4) 
  2. Error: geom_treemap_subgroup_text works with a colour aesthetic (@test_geoms.R#68) 
  3. Error: plots look the way they should (@test_plots.R#4) 
  
  Error: testthat unit tests failed
  Execution halted