Running ‘testthat.R’ [21s/32s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > #install.packages("testthat",dependencies=c("Depends", "Imports"))
  > #install.packages("relax")
  > library(testthat)
  > library(stacomiR)
  Loading required package: stacomirtools
  Loading required package: RODBC
  > 
  > #getUsername <- function(){
  > #  name <- Sys.info()[["user"]]
  > #  return(name)
  > #}
  > #if(getUsername() == 'cedric.briand')
  > #{
  > #  setwd("C:/workspace/stacomir/pkg/stacomir/")
  > #}
  > #if(getUsername() == 'marion.legrand')
  > #{
  > #  setwd("C:/Users/logrami/workspace/stacomir/pkg/stacomir/")
  > #}
  > #
  > #
  > ## to launch all
  > #
  > #
  > #if(getUsername() == 'cedric.briand')
  > #{
  > #  test_dir("C:/workspace/stacomir/pkg/stacomir/tests/testthat")
  > #}
  > #if(getUsername() == 'marion.legrand')
  > #{
  > #  test_dir("C:/Users/logrami/workspace/stacomir/pkg/stacomir/tests/testthat")
  > #}
  > 
  > test_check("stacomiR")
  ── 1. Error: report_df plot method works (@test-03-report_df.R#59)  ────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: plot(r_df, plot.type = "1", silent = TRUE) at testthat/test-03-report_df.R:59
  2: plot(r_df, plot.type = "1", silent = TRUE)
  3: .local(x, y, ...)
  4: print(g)
  5: print(g)
  6: print.ggplot(g)
  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)
  
  ── 2. Error: report_dc plot method works (@test-04-report_dc.R#59)  ────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: plot(r_dc, plot.type = "1", silent = TRUE) at testthat/test-04-report_dc.R:59
  2: plot(r_dc, plot.type = "1", silent = TRUE)
  3: .local(x, y, ...)
  4: print(g)
  5: print(g)
  6: print.ggplot(g)
  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)
  
  ── 3. Error: test plot methods for report_annual (@test-09-report_annual.R#177) 
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: plot(r_ann_adour, silent = TRUE) at testthat/test-09-report_annual.R:177
  2: plot(r_ann_adour, silent = TRUE)
  3: .local(x, ...)
  4: print(g)
  5: print(g)
  6: print.ggplot(g)
  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: 9 SKIPPED: 67 FAILED: 3
  1. Error: report_df plot method works (@test-03-report_df.R#59) 
  2. Error: report_dc plot method works (@test-04-report_dc.R#59) 
  3. Error: test plot methods for report_annual (@test-09-report_annual.R#177) 
  
  Error: testthat unit tests failed
  Execution halted