Running ‘testthat.R’ [4s/6s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(jskm)
  > 
  > test_check("jskm")
  ── 1. Error: Run jskm (@test-km.R#8)  ──────────────────────────────────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: expect_is(jskm(fit, timeby = 500, table = T, pval = T), "gtable") at testthat/test-km.R:8
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: jskm(fit, timeby = 500, table = T, pval = T)
  5: grid.arrange(p, blank.pic, data.table, clip = FALSE, nrow = 3, ncol = 1, heights = unit(c(2, 
         0.1, 0.25), c("null", "null", "null")))
  6: arrangeGrob(...)
  7: lapply(grobs[toconv], ggplot2::ggplotGrob)
  8: FUN(X[[i]], ...)
  9: ggplot_gtable(ggplot_build(x))
  10: ggplot_gtable.ggplot_built(ggplot_build(x))
  ...
  22: pushvpgp(x)
  23: pushgrobvp(x$vp)
  24: pushgrobvp.viewport(x$vp)
  25: pushViewport(vp, recording = FALSE)
  26: lapply(vps, push.vp, recording)
  27: FUN(X[[i]], ...)
  28: push.vp.vpTree(X[[i]], ...)
  29: push.vp(vp$parent, recording)
  30: push.vp.viewport(vp$parent, recording)
  31: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ── 2. Error: Run svyjskm (@test-km.R#37)  ──────────────────────────────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: expect_is(svyjskm(s1, table = T, pval = T, design = dpbc), "gtable") at testthat/test-km.R:37
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: svyjskm(s1, table = T, pval = T, design = dpbc)
  5: grid.arrange(p, blank.pic, data.table, clip = FALSE, nrow = 3, ncol = 1, heights = unit(c(2, 
         0.1, 0.25), c("null", "null", "null")))
  6: arrangeGrob(...)
  7: lapply(grobs[toconv], ggplot2::ggplotGrob)
  8: FUN(X[[i]], ...)
  9: ggplot_gtable(ggplot_build(x))
  10: ggplot_gtable.ggplot_built(ggplot_build(x))
  ...
  22: pushvpgp(x)
  23: pushgrobvp(x$vp)
  24: pushgrobvp.viewport(x$vp)
  25: pushViewport(vp, recording = FALSE)
  26: lapply(vps, push.vp, recording)
  27: FUN(X[[i]], ...)
  28: push.vp.vpTree(X[[i]], ...)
  29: push.vp(vp$parent, recording)
  30: push.vp.viewport(vp$parent, recording)
  31: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 2 SKIPPED: 0 FAILED: 2
  1. Error: Run jskm (@test-km.R#8) 
  2. Error: Run svyjskm (@test-km.R#37) 
  
  Error: testthat unit tests failed
  Execution halted