Running ‘testthat.R’ [1s/2s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(ggghost)
  Loading required package: ggplot2
  Loading required package: animation
  Registered S3 method overwritten by 'ggghost':
    method from   
    +.gg   ggplot2
  Please be aware: this development package has the potential to mess
  with your ggplot2 calls. If you find a bug, please let me know:
  https://github.com/jonocarroll/ggghost/issues
  > 
  > test_check("ggghost")
  ── 1. Error: (unknown) (@test_gif.R#12)  ───────────────────────────────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: lazarus(z, "testgif.gif") at testthat/test_gif.R:12
  2: animation::saveGIF({
         recover_data(object, supp = TRUE)
         ggtmp <- object[[1]]
         print(eval(ggtmp))
         for (i in 2:length(object)) {
             ggtmp <- eval(ggtmp) + eval(object[[i]])
             print(ggtmp)
         }
     }, movie.name = gifname)
  3: in_dir(owd, expr)
  4: print(eval(ggtmp))
  5: print.ggplot(eval(ggtmp))
  6: grid.draw(gtable)
  7: grid.draw.gTree(gtable)
  8: recordGraphics(drawGTree(x), list(x = x), getNamespace("grid"))
  9: drawGTree(x)
  10: preDraw(x)
  11: preDraw.gTree(x)
  12: pushvpgp(x)
  13: pushgrobvp(x$vp)
  14: pushgrobvp.viewport(x$vp)
  15: pushViewport(vp, recording = FALSE)
  16: lapply(vps, push.vp, recording)
  17: FUN(X[[i]], ...)
  18: push.vp.viewport(X[[i]], ...)
  19: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ── 2. Error: ggghost methods behave correctly (@test_methods.R#16)  ────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: expect_s3_class(print(ggghostx), "gg") at testthat/test_methods.R:16
  2: quasi_label(enquo(object))
  3: eval_bare(get_expr(quo), get_env(quo))
  4: print(ggghostx)
  5: print.ggghost(ggghostx)
  6: print(plotdata)
  7: print.ggplot(plotdata)
  8: grid.draw(gtable)
  9: grid.draw.gTree(gtable)
  10: recordGraphics(drawGTree(x), list(x = x), getNamespace("grid"))
  11: drawGTree(x)
  12: preDraw(x)
  13: preDraw.gTree(x)
  14: pushvpgp(x)
  15: pushgrobvp(x$vp)
  16: pushgrobvp.viewport(x$vp)
  17: pushViewport(vp, recording = FALSE)
  18: lapply(vps, push.vp, recording)
  19: FUN(X[[i]], ...)
  20: push.vp.viewport(X[[i]], ...)
  21: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 39 SKIPPED: 0 FAILED: 2
  1. Error: (unknown) (@test_gif.R#12) 
  2. Error: ggghost methods behave correctly (@test_methods.R#16) 
  
  Error: testthat unit tests failed
  Execution halted