Running ‘testthat.R’ [13s/13s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(ggformula)
  Loading required package: ggplot2
  Loading required package: ggstance
  
  Attaching package: 'ggstance'
  
  The following objects are masked from 'package:ggplot2':
  
      GeomErrorbarh, geom_errorbarh
  
  
  New to ggformula?  Try the tutorials: 
  	learnr::run_tutorial("introduction", package = "ggformula")
  	learnr::run_tutorial("refining", package = "ggformula")
  > 
  > test_check("ggformula")
  ── 1. Error: gf_abline() (@test-layer-factory.R#8)  ────────────────────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: vdiffr::expect_doppelganger("gf_abline1", gf_point(Sepal.Length ~ Sepal.Width, data = iris) %>% 
         gf_abline(intercept = 3, slope = 1, color = "red")) at testthat/test-layer-factory.R:8
  2: writer(fig, testcase, title)
  3: print_plot(plot, title)
  4: print_plot.ggplot(plot, title)
  5: print(p)
  6: print.ggplot(p)
  7: grid.draw(gtable)
  8: grid.draw.gTree(gtable)
  9: recordGraphics(drawGTree(x), list(x = x), getNamespace("grid"))
  10: drawGTree(x)
  11: preDraw(x)
  12: preDraw.gTree(x)
  13: pushvpgp(x)
  14: pushgrobvp(x$vp)
  15: pushgrobvp.viewport(x$vp)
  16: pushViewport(vp, recording = FALSE)
  17: lapply(vps, push.vp, recording)
  18: FUN(X[[i]], ...)
  19: push.vp.viewport(X[[i]], ...)
  20: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ── 2. Error: gf_area() & gf_ribbon() (@test-layer-factory.R#56)  ───────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: vdiffr::expect_doppelganger("gf_ribbon1", gf_ribbon(low_temp + high_temp ~ date, 
         data = Temps, color = "navy", alpha = 0.3)) at testthat/test-layer-factory.R:56
  2: writer(fig, testcase, title)
  3: print_plot(plot, title)
  4: print_plot.ggplot(plot, title)
  5: print(p)
  6: print.ggplot(p)
  7: grid.draw(gtable)
  8: grid.draw.gTree(gtable)
  9: recordGraphics(drawGTree(x), list(x = x), getNamespace("grid"))
  10: drawGTree(x)
  11: preDraw(x)
  12: preDraw.gTree(x)
  13: pushvpgp(x)
  14: pushgrobvp(x$vp)
  15: pushgrobvp.viewport(x$vp)
  16: pushViewport(vp, recording = FALSE)
  17: lapply(vps, push.vp, recording)
  18: FUN(X[[i]], ...)
  19: push.vp.viewport(X[[i]], ...)
  20: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ── 3. Error: gf_ash() (@test-layer-factory.R#77)  ──────────────────────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: vdiffr::expect_doppelganger("gf_ash1", gf_ash(~Sepal.Length, color = ~Species, data = iris)) at testthat/test-layer-factory.R:77
  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)
  
  ── 4. Error: gf_bar() and gf_col() (@test-layer-factory.R#96)  ─────────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: vdiffr::expect_doppelganger("gf_bar1", gf_bar(~Species, data = iris)) at testthat/test-layer-factory.R:96
  2: writer(fig, testcase, title)
  3: print_plot(plot, title)
  4: print_plot.ggplot(plot, title)
  5: print(p)
  6: print.ggplot(p)
  7: grid.draw(gtable)
  8: grid.draw.gTree(gtable)
  9: recordGraphics(drawGTree(x), list(x = x), getNamespace("grid"))
  10: drawGTree(x)
  11: preDraw(x)
  12: preDraw.gTree(x)
  13: pushvpgp(x)
  14: pushgrobvp(x$vp)
  15: pushgrobvp.viewport(x$vp)
  16: pushViewport(vp, recording = FALSE)
  17: lapply(vps, push.vp, recording)
  18: FUN(X[[i]], ...)
  19: push.vp.viewport(X[[i]], ...)
  20: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ── 5. Error: gf_barh() and gf_colh() (@test-layer-factory.R#114)  ──────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: vdiffr::expect_doppelganger("gf_barh1", gf_barh(Species ~ ., data = iris)) at testthat/test-layer-factory.R:114
  2: writer(fig, testcase, title)
  3: print_plot(plot, title)
  4: print_plot.ggplot(plot, title)
  5: print(p)
  6: print.ggplot(p)
  7: grid.draw(gtable)
  8: grid.draw.gTree(gtable)
  9: recordGraphics(drawGTree(x), list(x = x), getNamespace("grid"))
  10: drawGTree(x)
  11: preDraw(x)
  12: preDraw.gTree(x)
  13: pushvpgp(x)
  14: pushgrobvp(x$vp)
  15: pushgrobvp.viewport(x$vp)
  16: pushViewport(vp, recording = FALSE)
  17: lapply(vps, push.vp, recording)
  18: FUN(X[[i]], ...)
  19: push.vp.viewport(X[[i]], ...)
  20: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ── 6. Error: gf_bin2d() (@test-layer-factory.R#131)  ───────────────────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: vdiffr::expect_doppelganger("gf_bin2d1", gf_bin2d(eruptions ~ waiting, data = faithful, 
         bins = 15) %>% gf_refine(scale_fill_viridis_c(begin = 0.1, end = 0.9))) at testthat/test-layer-factory.R:131
  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)
  
  ── 7. Error: gf_contour(), gf_density2d(), and gf_density_2d() (@test-layer-fact
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: vdiffr::expect_doppelganger("gf_countour1", gf_point(eruptions ~ waiting, data = faithful) %>% 
         gf_contour(density ~ waiting + eruptions, data = faithfuld)) at testthat/test-layer-factory.R:142
  2: writer(fig, testcase, title)
  3: print_plot(plot, title)
  4: print_plot.ggplot(plot, title)
  5: print(p)
  6: print.ggplot(p)
  7: grid.draw(gtable)
  8: grid.draw.gTree(gtable)
  9: recordGraphics(drawGTree(x), list(x = x), getNamespace("grid"))
  10: drawGTree(x)
  11: preDraw(x)
  12: preDraw.gTree(x)
  13: pushvpgp(x)
  14: pushgrobvp(x$vp)
  15: pushgrobvp.viewport(x$vp)
  16: pushViewport(vp, recording = FALSE)
  17: lapply(vps, push.vp, recording)
  18: FUN(X[[i]], ...)
  19: push.vp.viewport(X[[i]], ...)
  20: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ── 8. Error: gf_boxplot() (@test-layer-factory.R#163)  ─────────────────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: vdiffr::expect_doppelganger("gf_boxplot1", gf_boxplot(Sepal.Length ~ Species, color = ~Species, 
         data = iris)) at testthat/test-layer-factory.R:163
  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)
  
  ── 9. Error: gf_coefline() (@test-layer-factory.R#186)  ────────────────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: vdiffr::expect_doppelganger("gf_coefline1", gf_point(Sepal.Length ~ Sepal.Width, 
         data = iris) %>% gf_coefline(coef = coef(mdl))) at testthat/test-layer-factory.R:186
  2: writer(fig, testcase, title)
  3: print_plot(plot, title)
  4: print_plot.ggplot(plot, title)
  5: print(p)
  6: print.ggplot(p)
  7: grid.draw(gtable)
  8: grid.draw.gTree(gtable)
  9: recordGraphics(drawGTree(x), list(x = x), getNamespace("grid"))
  10: drawGTree(x)
  11: preDraw(x)
  12: preDraw.gTree(x)
  13: pushvpgp(x)
  14: pushgrobvp(x$vp)
  15: pushgrobvp.viewport(x$vp)
  16: pushViewport(vp, recording = FALSE)
  17: lapply(vps, push.vp, recording)
  18: FUN(X[[i]], ...)
  19: push.vp.viewport(X[[i]], ...)
  20: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ── 10. Error: gf_contour(), gf_density_2d(), gf_density2d() (@test-layer-factory
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: vdiffr::expect_doppelganger("gf_contour1", gf_density_2d(eruptions ~ waiting, data = faithful, 
         alpha = 0.5, color = "navy") %>% gf_contour(density ~ waiting + eruptions, data = faithfuld, 
         bins = 10, color = "red")) at testthat/test-layer-factory.R:202
  2: writer(fig, testcase, title)
  3: print_plot(plot, title)
  4: print_plot.ggplot(plot, title)
  5: print(p)
  6: print.ggplot(p)
  7: grid.draw(gtable)
  8: grid.draw.gTree(gtable)
  9: recordGraphics(drawGTree(x), list(x = x), getNamespace("grid"))
  10: drawGTree(x)
  11: preDraw(x)
  12: preDraw.gTree(x)
  13: pushvpgp(x)
  14: pushgrobvp(x$vp)
  15: pushgrobvp.viewport(x$vp)
  16: pushViewport(vp, recording = FALSE)
  17: lapply(vps, push.vp, recording)
  18: FUN(X[[i]], ...)
  19: push.vp.viewport(X[[i]], ...)
  20: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ── 11. Error: gf_countsh(), gf_percentssh(), gf_propssh() (@test-layer-factory.R
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: vdiffr::expect_doppelganger("gf_countsh1", gf_countsh(~substance, data = mosaicData::HELPrct, 
         fill = ~sex, position = "dodgev")) at testthat/test-layer-factory.R:227
  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)
  
  ── 12. Error: gf__counts(), gf_props(), gf_percents() (@test-layer-factory.R#257
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: vdiffr::expect_doppelganger("gf_counts1", gf_counts(~substance, data = mosaicData::HELPrct, 
         fill = ~sex, position = position_dodge())) at testthat/test-layer-factory.R:257
  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)
  
  ── 13. Error: gf_crossbar(), gf_errorbar(), gf_pointrange() (@test-layer-factory
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: vdiffr::expect_doppelganger("gf_pointrange2", gf_jitter(age ~ substance, data = mosaicData::HELPrct, 
         seed = 123, alpha = 0.5, width = 0.2, height = 0, color = "skyblue") %>% gf_pointrange(mean.age + 
         lo + hi ~ substance, data = HELP2) %>% gf_facet_grid(~sex)) at testthat/test-layer-factory.R:287
  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: layout$render(geom_grobs, data, theme, plot$labels)
  10: f(..., self = self)
  11: 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)
  12: f(...)
  13: render_strips(col_vars, row_vars, params$labeller, theme)
  14: build_strip(x, labeller, theme, TRUE)
  15: ggstrip(grobs, theme, element, gp, horizontal, clip = "on")
  16: Summary.unit(structure(c(4.4, 4.4), unit = 8L, class = c("margin", "unit")), na.rm = FALSE)
  
  ── 14. Error: gf_crossbarh(), gf_errorbarh(), gf_pointrangeh() (@test-layer-fact
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: vdiffr::expect_doppelganger("gf_pointrangeh1", gf_jitter(substance ~ age, data = mosaicData::HELPrct, 
         seed = 123, alpha = 0.5, height = 0.2, width = 0, color = "skyblue") %>% gf_pointrangeh(substance ~ 
         mean.age + lo + hi, data = HELP2) %>% gf_facet_grid(sex ~ .)) at testthat/test-layer-factory.R:327
  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: layout$render(geom_grobs, data, theme, plot$labels)
  10: f(..., self = self)
  11: 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)
  12: f(...)
  13: render_strips(col_vars, row_vars, params$labeller, theme)
  14: build_strip(y, labeller, theme, FALSE)
  15: ggstrip(grobs_right, theme, element, gp, horizontal, clip = "on")
  16: Summary.unit(structure(c(4.4, 4.4), unit = 8L, class = c("margin", "unit")), na.rm = FALSE)
  
  ── 15. Error: gf_curve() and gf_segment() (@test-layer-factory.R#356)  ─────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: vdiffr::expect_doppelganger("gf_curve_segment1", gf_point(mpg ~ wt, data = mtcars) %>% 
         gf_curve(y1 + y2 ~ x1 + x2, data = SomeData, color = "navy") %>% gf_segment(y1 + 
         y2 ~ x1 + x2, data = SomeData, color = "red")) at testthat/test-layer-factory.R:356
  2: writer(fig, testcase, title)
  3: print_plot(plot, title)
  4: print_plot.ggplot(plot, title)
  5: print(p)
  6: print.ggplot(p)
  7: grid.draw(gtable)
  8: grid.draw.gTree(gtable)
  9: recordGraphics(drawGTree(x), list(x = x), getNamespace("grid"))
  10: drawGTree(x)
  11: preDraw(x)
  12: preDraw.gTree(x)
  13: pushvpgp(x)
  14: pushgrobvp(x$vp)
  15: pushgrobvp.viewport(x$vp)
  16: pushViewport(vp, recording = FALSE)
  17: lapply(vps, push.vp, recording)
  18: FUN(X[[i]], ...)
  19: push.vp.viewport(X[[i]], ...)
  20: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ── 16. Error: gf_dens() and gf_density (@test-layer-factory.R#368)  ────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: vdiffr::expect_doppelganger("gf_dens1", gf_dens(~Sepal.Length, data = iris)) at testthat/test-layer-factory.R:368
  2: writer(fig, testcase, title)
  3: print_plot(plot, title)
  4: print_plot.ggplot(plot, title)
  5: print(p)
  6: print.ggplot(p)
  7: grid.draw(gtable)
  8: grid.draw.gTree(gtable)
  9: recordGraphics(drawGTree(x), list(x = x), getNamespace("grid"))
  10: drawGTree(x)
  11: preDraw(x)
  12: preDraw.gTree(x)
  13: pushvpgp(x)
  14: pushgrobvp(x$vp)
  15: pushgrobvp.viewport(x$vp)
  16: pushViewport(vp, recording = FALSE)
  17: lapply(vps, push.vp, recording)
  18: FUN(X[[i]], ...)
  19: push.vp.viewport(X[[i]], ...)
  20: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ── 17. Error: gf_dist() (@test-layer-factory.R#389)  ───────────────────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: vdiffr::expect_doppelganger("gf_dist1", gf_dist("norm", mean = 10, sd = 2)) at testthat/test-layer-factory.R:389
  2: writer(fig, testcase, title)
  3: print_plot(plot, title)
  4: print_plot.ggplot(plot, title)
  5: print(p)
  6: print.ggplot(p)
  7: grid.draw(gtable)
  8: grid.draw.gTree(gtable)
  9: recordGraphics(drawGTree(x), list(x = x), getNamespace("grid"))
  10: drawGTree(x)
  11: preDraw(x)
  12: preDraw.gTree(x)
  13: pushvpgp(x)
  14: pushgrobvp(x$vp)
  15: pushgrobvp.viewport(x$vp)
  16: pushViewport(vp, recording = FALSE)
  17: lapply(vps, push.vp, recording)
  18: FUN(X[[i]], ...)
  19: push.vp.viewport(X[[i]], ...)
  20: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ── 18. Error: gf_dotplot() (@test-layer-factory.R#420)  ────────────────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: vdiffr::expect_doppelganger("gf_dotplot1", gf_dotplot(~Sepal.Length, fill = ~Species, 
         data = iris, binwidth = 0.2) %>% gf_labs(title = "dotdensity")) at testthat/test-layer-factory.R:420
  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)
  
  ── 19. Error: gf_empty(), gf_blank(), and gf_frame() (@test-layer-factory.R#437)
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: vdiffr::expect_doppelganger("gf_empty1", gf_empty() %>% gf_labs(title = "empty")) at testthat/test-layer-factory.R:437
  2: writer(fig, testcase, title)
  3: print_plot(plot, title)
  4: print_plot.ggplot(plot, title)
  5: print(p)
  6: print.ggplot(p)
  7: grid.draw(gtable)
  8: grid.draw.gTree(gtable)
  9: recordGraphics(drawGTree(x), list(x = x), getNamespace("grid"))
  10: drawGTree(x)
  11: preDraw(x)
  12: preDraw.gTree(x)
  13: pushvpgp(x)
  14: pushgrobvp(x$vp)
  15: pushgrobvp.viewport(x$vp)
  16: pushViewport(vp, recording = FALSE)
  17: lapply(vps, push.vp, recording)
  18: FUN(X[[i]], ...)
  19: push.vp.viewport(X[[i]], ...)
  20: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ── 20. Error: gf_fitdistr() (@test-layer-factory.R#466)  ───────────────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: vdiffr::expect_doppelganger("gf_fitdistr1", gf_fitdistr(~length, data = mosaicData::KidsFeet, 
         inherit = FALSE) %>% gf_dhistogram(~length, data = mosaicData::KidsFeet, binwidth = 0.5, 
         alpha = 0.25)) at testthat/test-layer-factory.R:466
  2: writer(fig, testcase, title)
  3: print_plot(plot, title)
  4: print_plot.ggplot(plot, title)
  5: print(p)
  6: print.ggplot(p)
  7: grid.draw(gtable)
  8: grid.draw.gTree(gtable)
  9: recordGraphics(drawGTree(x), list(x = x), getNamespace("grid"))
  10: drawGTree(x)
  11: preDraw(x)
  12: preDraw.gTree(x)
  13: pushvpgp(x)
  14: pushgrobvp(x$vp)
  15: pushgrobvp.viewport(x$vp)
  16: pushViewport(vp, recording = FALSE)
  17: lapply(vps, push.vp, recording)
  18: FUN(X[[i]], ...)
  19: push.vp.viewport(X[[i]], ...)
  20: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ── 21. Error: gf_freqpoly() (@test-layer-factory.R#483)  ───────────────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: vdiffr::expect_doppelganger("gf_freqpoly1", gf_freqpoly(~Sepal.Length, color = ~Species, 
         data = iris)) at testthat/test-layer-factory.R:483
  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)
  
  ── 22. Error: gf_freqpoly() (@test-layer-factory.R#498)  ───────────────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: vdiffr::expect_doppelganger("gf_fun1", gf_fun(sin(x) ~ x, color = ~"sin", xlim = pi * 
         c(-2, 2)) %>% gf_fun(cos(x) ~ x, color = ~"cosine", xlim = pi * c(-2, 2))) at testthat/test-layer-factory.R:498
  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)
  
  ── 23. Error: gf_fun2d() (@test-layer-factory.R#515)  ──────────────────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: vdiffr::expect_doppelganger("gf_fun2d1", gf_function_2d(fun = function(x, y) sin(2 * 
         x * y), xlim = c(-pi, pi), ylim = c(-pi, pi)) %>% gf_refine(scale_fill_viridis_c())) at testthat/test-layer-factory.R:515
  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)
  
  ── 24. Error: gf_hex() (@test-layer-factory.R#555)  ────────────────────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: vdiffr::expect_doppelganger("gf_hex1", gf_hex(avg_drinks ~ age, data = mosaicData::HELPrct, 
         bins = 15) %>% gf_density2d(avg_drinks ~ age, data = mosaicData::HELPrct, color = "yellow", 
         alpha = 0.5)) at testthat/test-layer-factory.R:555
  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)
  
  ── 25. Error: gf_histogram() and gf_dhistogram (@test-layer-factory.R#569)  ────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: vdiffr::expect_doppelganger("gf_histogram1", gf_histogram(~Sepal.Length, data = iris)) at testthat/test-layer-factory.R:569
  2: writer(fig, testcase, title)
  3: print_plot(plot, title)
  4: print_plot.ggplot(plot, title)
  5: print(p)
  6: print.ggplot(p)
  7: grid.draw(gtable)
  8: grid.draw.gTree(gtable)
  9: recordGraphics(drawGTree(x), list(x = x), getNamespace("grid"))
  10: drawGTree(x)
  11: preDraw(x)
  12: preDraw.gTree(x)
  13: pushvpgp(x)
  14: pushgrobvp(x$vp)
  15: pushgrobvp.viewport(x$vp)
  16: pushViewport(vp, recording = FALSE)
  17: lapply(vps, push.vp, recording)
  18: FUN(X[[i]], ...)
  19: push.vp.viewport(X[[i]], ...)
  20: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ── 26. Error: gf_line() (@test-layer-factory.R#596)  ───────────────────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: vdiffr::expect_doppelganger("gf_line1", gf_line(births ~ date, data = mosaicData::Births78)) at testthat/test-layer-factory.R:596
  2: writer(fig, testcase, title)
  3: print_plot(plot, title)
  4: print_plot.ggplot(plot, title)
  5: print(p)
  6: print.ggplot(p)
  7: grid.draw(gtable)
  8: grid.draw.gTree(gtable)
  9: recordGraphics(drawGTree(x), list(x = x), getNamespace("grid"))
  10: drawGTree(x)
  11: preDraw(x)
  12: preDraw.gTree(x)
  13: pushvpgp(x)
  14: pushgrobvp(x$vp)
  15: pushgrobvp.viewport(x$vp)
  16: pushViewport(vp, recording = FALSE)
  17: lapply(vps, push.vp, recording)
  18: FUN(X[[i]], ...)
  19: push.vp.viewport(X[[i]], ...)
  20: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ── 27. Error: gf_label() and gf_text() (@test-layer-factory.R#610)  ────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: vdiffr::expect_doppelganger("gf_label1", gf_label(width ~ length, data = mosaicData::KidsFeet, 
         label = ~name)) at testthat/test-layer-factory.R:610
  2: writer(fig, testcase, title)
  3: print_plot(plot, title)
  4: print_plot.ggplot(plot, title)
  5: print(p)
  6: print.ggplot(p)
  7: grid.draw(gtable)
  8: grid.draw.gTree(gtable)
  9: recordGraphics(drawGTree(x), list(x = x), getNamespace("grid"))
  10: drawGTree(x)
  11: preDraw(x)
  12: preDraw.gTree(x)
  13: pushvpgp(x)
  14: pushgrobvp(x$vp)
  15: pushgrobvp.viewport(x$vp)
  16: pushViewport(vp, recording = FALSE)
  17: lapply(vps, push.vp, recording)
  18: FUN(X[[i]], ...)
  19: push.vp.viewport(X[[i]], ...)
  20: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ── 28. Error: gf_linerange() and gf_pointrange() (@test-layer-factory.R#624)  ──
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: vdiffr::expect_doppelganger("gf_linerange1", gf_linerange(low_temp + high_temp ~ 
         date, data = mosaicData::Weather, color = ~avg_temp) %>% gf_facet_grid(city ~ 
         year, scale = "free") %>% gf_refine(scale_color_viridis_c(option = "C", begin = 0.1, 
         end = 0.8))) at testthat/test-layer-factory.R:624
  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: layout$render(geom_grobs, data, theme, plot$labels)
  10: f(..., self = self)
  11: 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)
  12: f(...)
  13: render_strips(col_vars, row_vars, params$labeller, theme)
  14: build_strip(x, labeller, theme, TRUE)
  15: ggstrip(grobs, theme, element, gp, horizontal, clip = "on")
  16: Summary.unit(structure(c(4.4, 4.4), unit = 8L, class = c("margin", "unit")), na.rm = FALSE)
  
  ── 29. Error: gf_point() (@test-layer-factory.R#645)  ──────────────────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: vdiffr::expect_doppelganger("gf_point1", gf_point(Sepal.Length ~ Sepal.Width, data = iris)) at testthat/test-layer-factory.R:645
  2: writer(fig, testcase, title)
  3: print_plot(plot, title)
  4: print_plot.ggplot(plot, title)
  5: print(p)
  6: print.ggplot(p)
  7: grid.draw(gtable)
  8: grid.draw.gTree(gtable)
  9: recordGraphics(drawGTree(x), list(x = x), getNamespace("grid"))
  10: drawGTree(x)
  11: preDraw(x)
  12: preDraw.gTree(x)
  13: pushvpgp(x)
  14: pushgrobvp(x$vp)
  15: pushgrobvp.viewport(x$vp)
  16: pushViewport(vp, recording = FALSE)
  17: lapply(vps, push.vp, recording)
  18: FUN(X[[i]], ...)
  19: push.vp.viewport(X[[i]], ...)
  20: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ── 30. Error: gf_qq(), gf_qqstep(), gf_qqline() (@test-layer-factory.R#659)  ───
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: vdiffr::expect_doppelganger("gf_qq1", gf_qq(~age | substance, data = mosaicData::HELPrct) %>% 
         gf_qqline()) at testthat/test-layer-factory.R:659
  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: layout$render(geom_grobs, data, theme, plot$labels)
  10: f(..., self = self)
  11: 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)
  12: f(...)
  13: render_strips(structure(labels_df, type = "rows"), structure(labels_df, type = "cols"), 
         params$labeller, theme)
  14: build_strip(x, labeller, theme, TRUE)
  15: ggstrip(grobs, theme, element, gp, horizontal, clip = "on")
  16: Summary.unit(structure(c(4.4, 4.4), unit = 8L, class = c("margin", "unit")), na.rm = FALSE)
  
  ── 31. Error: gf_quantile() (@test-layer-factory.R#677)  ───────────────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: vdiffr::expect_doppelganger("gf_quantile", gf_point((1/hwy) ~ displ, data = mpg) %>% 
         gf_quantile((1/hwy) ~ displ, quantiles = 0.5, color = "red") %>% gf_quantile((1/hwy) ~ 
         displ, quantiles = c(0.2, 0.8))) at testthat/test-layer-factory.R:677
  2: writer(fig, testcase, title)
  3: print_plot(plot, title)
  4: print_plot.ggplot(plot, title)
  5: print(p)
  6: print.ggplot(p)
  7: grid.draw(gtable)
  8: grid.draw.gTree(gtable)
  9: recordGraphics(drawGTree(x), list(x = x), getNamespace("grid"))
  10: drawGTree(x)
  11: preDraw(x)
  12: preDraw.gTree(x)
  13: pushvpgp(x)
  14: pushgrobvp(x$vp)
  15: pushgrobvp.viewport(x$vp)
  16: pushViewport(vp, recording = FALSE)
  17: lapply(vps, push.vp, recording)
  18: FUN(X[[i]], ...)
  19: push.vp.viewport(X[[i]], ...)
  20: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ── 32. Error: gf_raster(), gf_tile(), gf_density2d() (@test-layer-factory.R#690)
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: vdiffr::expect_doppelganger("gf_raster1", gf_raster(density ~ eruptions + waiting, 
         data = faithfuld)) at testthat/test-layer-factory.R:690
  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)
  
  ── 33. Error: gf_rect() (@test-layer-factory.R#710)  ───────────────────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: vdiffr::expect_doppelganger("gf_rect1", gf_rect(1.5 + 3 ~ 40 + 68, fill = "red", 
         alpha = 0.2) %>% gf_rect(3 + 5.5 ~ 68 + 100, fill = "green", alpha = 0.2) %>% 
         gf_point(eruptions ~ waiting, data = faithful)) at testthat/test-layer-factory.R:710
  2: writer(fig, testcase, title)
  3: print_plot(plot, title)
  4: print_plot.ggplot(plot, title)
  5: print(p)
  6: print.ggplot(p)
  7: grid.draw(gtable)
  8: grid.draw.gTree(gtable)
  9: recordGraphics(drawGTree(x), list(x = x), getNamespace("grid"))
  10: drawGTree(x)
  11: preDraw(x)
  12: preDraw.gTree(x)
  13: pushvpgp(x)
  14: pushgrobvp(x$vp)
  15: pushgrobvp.viewport(x$vp)
  16: pushViewport(vp, recording = FALSE)
  17: lapply(vps, push.vp, recording)
  18: FUN(X[[i]], ...)
  19: push.vp.viewport(X[[i]], ...)
  20: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ── 34. Error: gf_rect() (@test-layer-factory.R#727)  ───────────────────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: vdiffr::expect_doppelganger("gf_spoke1", gf_point(y ~ x, data = SomeData) %>% gf_spoke(y ~ 
         x, angle = ~angle, radius = 0.5)) at testthat/test-layer-factory.R:727
  2: writer(fig, testcase, title)
  3: print_plot(plot, title)
  4: print_plot.ggplot(plot, title)
  5: print(p)
  6: print.ggplot(p)
  7: grid.draw(gtable)
  8: grid.draw.gTree(gtable)
  9: recordGraphics(drawGTree(x), list(x = x), getNamespace("grid"))
  10: drawGTree(x)
  11: preDraw(x)
  12: preDraw.gTree(x)
  13: pushvpgp(x)
  14: pushgrobvp(x$vp)
  15: pushgrobvp.viewport(x$vp)
  16: pushViewport(vp, recording = FALSE)
  17: lapply(vps, push.vp, recording)
  18: FUN(X[[i]], ...)
  19: push.vp.viewport(X[[i]], ...)
  20: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 4 SKIPPED: 0 FAILED: 34
  1. Error: gf_abline() (@test-layer-factory.R#8) 
  2. Error: gf_area() & gf_ribbon() (@test-layer-factory.R#56) 
  3. Error: gf_ash() (@test-layer-factory.R#77) 
  4. Error: gf_bar() and gf_col() (@test-layer-factory.R#96) 
  5. Error: gf_barh() and gf_colh() (@test-layer-factory.R#114) 
  6. Error: gf_bin2d() (@test-layer-factory.R#131) 
  7. Error: gf_contour(), gf_density2d(), and gf_density_2d() (@test-layer-factory.R#142) 
  8. Error: gf_boxplot() (@test-layer-factory.R#163) 
  9. Error: gf_coefline() (@test-layer-factory.R#186) 
  1. ...
  
  Error: testthat unit tests failed
  Execution halted