Running ‘testthat.R’ [18s/18s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(otvPlots)
  > 
  > test_check("otvPlots")
  ── 1. Error: PlotCatVar returns a gtable (@test_PlotCatVar.R#9)  ───────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: PlotCatVar("marital", testData, NULL, "weeks", "months") at testthat/test_PlotCatVar.R:9
  2: gridExtra::arrangeGrob(ggplot2::ggplotGrob(p), p2$p, widths = c(1, 2))
  3: lapply(grobs[toconv], ggplot2::ggplotGrob)
  4: FUN(X[[i]], ...)
  5: ggplot_gtable(ggplot_build(x))
  6: ggplot_gtable.ggplot_built(ggplot_build(x))
  7: layout$render(geom_grobs, data, theme, plot$labels)
  8: f(..., self = self)
  9: 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)
  10: f(...)
  11: render_strips(structure(labels_df, type = "rows"), structure(labels_df, type = "cols"), 
         params$labeller, theme)
  12: build_strip(x, labeller, theme, TRUE)
  13: ggstrip(grobs, theme, element, gp, horizontal, clip = "on")
  14: Summary.unit(structure(c(4.4, 4.4), unit = 8L, class = c("margin", "unit")), na.rm = FALSE)
  
  ── 2. Error: PlotNumVar returns a gtable (@test_PlotNumVar.R#9)  ───────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: PlotNumVar("age", testData, NULL, "weeks", "months", skewOpt = 3, kSample = NULL) at testthat/test_PlotNumVar.R:9
  2: rbind(ggplot2::ggplotGrob(p2), ggplot2::ggplotGrob(p3), ggplot2::ggplotGrob(p4), 
         size = "last")
  3: ggplot2::ggplotGrob(p2)
  4: ggplot_gtable(ggplot_build(x))
  5: ggplot_gtable.ggplot_built(ggplot_build(x))
  6: build_guides(plot$scales, plot$layers, plot$mapping, position, theme, plot$guides, 
         plot$labels)
  7: guides_gengrob(gdefs, theme)
  8: lapply(gdefs, guide_gengrob, theme)
  9: FUN(X[[i]], ...)
  10: guide_gengrob.legend(X[[i]], ...)
  ...
  17: pushvpgp(x)
  18: pushgrobvp(x$vp)
  19: pushgrobvp.viewport(x$vp)
  20: pushViewport(vp, recording = FALSE)
  21: lapply(vps, push.vp, recording)
  22: FUN(X[[i]], ...)
  23: push.vp.vpTree(X[[i]], ...)
  24: push.vp(vp$parent, recording)
  25: push.vp.viewport(vp$parent, recording)
  26: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 202 SKIPPED: 0 FAILED: 2
  1. Error: PlotCatVar returns a gtable (@test_PlotCatVar.R#9) 
  2. Error: PlotNumVar returns a gtable (@test_PlotNumVar.R#9) 
  
  Error: testthat unit tests failed
  Execution halted