Running ‘testthat.R’ [2s/2s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(plotROC)
  Loading required package: ggplot2
  > 
  > test_check("plotROC")
  ── 1. Error: Calculate ROC returns a valid ROC curve (@test-calc.R#25)  ────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: expect_warning(print(ggplot(testdata, aes(m = T1, d = D + 1)) + geom_roc())) at testthat/test-calc.R:25
  2: quasi_capture(enquo(object), capture_warnings, label = label)
  3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
  4: withCallingHandlers(code, warning = function(condition) {
         out$push(condition)
         invokeRestart("muffleWarning")
     })
  5: eval_bare(get_expr(quo), get_env(quo))
  6: print(ggplot(testdata, aes(m = T1, d = D + 1)) + geom_roc())
  7: print.ggplot(ggplot(testdata, aes(m = T1, d = D + 1)) + geom_roc())
  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)
  
  ── 2. Error: Non 0/1 labels work, with warning (@test-calc.R#40)  ──────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: expect_warning(print(ggplot(testdata, aes(m = T1, d = D.str)) + stat_roc())) at testthat/test-calc.R:40
  2: quasi_capture(enquo(object), capture_warnings, label = label)
  3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
  4: withCallingHandlers(code, warning = function(condition) {
         out$push(condition)
         invokeRestart("muffleWarning")
     })
  5: eval_bare(get_expr(quo), get_env(quo))
  6: print(ggplot(testdata, aes(m = T1, d = D.str)) + stat_roc())
  7: print.ggplot(ggplot(testdata, aes(m = T1, d = D.str)) + stat_roc())
  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: 10 SKIPPED: 0 FAILED: 2
  1. Error: Calculate ROC returns a valid ROC curve (@test-calc.R#25) 
  2. Error: Non 0/1 labels work, with warning (@test-calc.R#40) 
  
  Error: testthat unit tests failed
  Execution halted