Running ‘testthat.R’ [15s/9s]
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)  ───────────────
  unused argument (units = "days")
  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_build(x)
  7: layout$train_ranges(plot$coordinates)
  8: f(..., self = self)
  9: Map(compute_range, self$panel_layout$SCALE_X, self$panel_layout$SCALE_Y)
  10: mapply(FUN = f, ..., SIMPLIFY = FALSE)
  ...
  15: scale_details$break_info(range)
  16: f(..., self = self)
  17: self$get_breaks(range)
  18: f(..., self = self)
  19: self$trans$breaks(limits)
  20: pretty(x, n, ...)
  21: pretty.Date(x, n, ...)
  22: makeOutput(init.at, st.i)
  23: structure(if (isDate) if (round) as.Date(round(at, units = "days")) else at else as.POSIXct(at), 
         labels = format(at, s$format))
  24: as.Date(round(at, units = "days"))
  
  ── 2. Error: PlotNumVar returns a gtable (@test_PlotNumVar.R#9)  ───────────────
  unused argument (units = "days")
  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_build(x)
  6: layout$train_ranges(plot$coordinates)
  7: f(..., self = self)
  8: Map(compute_range, self$panel_layout$SCALE_X, self$panel_layout$SCALE_Y)
  9: mapply(FUN = f, ..., SIMPLIFY = FALSE)
  10: (function (ix, iy) 
     {
         coord$train(list(x = self$panel_scales$x[[ix]], y = self$panel_scales$y[[iy]]))
     })(dots[[1L]][[1L]], dots[[2L]][[1L]])
  ...
  14: scale_details$break_info(range)
  15: f(..., self = self)
  16: self$get_breaks(range)
  17: f(..., self = self)
  18: self$trans$breaks(limits)
  19: pretty(x, n, ...)
  20: pretty.Date(x, n, ...)
  21: makeOutput(init.at, st.i)
  22: structure(if (isDate) if (round) as.Date(round(at, units = "days")) else at else as.POSIXct(at), 
         labels = format(at, s$format))
  23: as.Date(round(at, units = "days"))
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 201 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