Running ‘testthat.R’ [26s/28s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(survtmle)
  survtmle: Targeted Learning for Survival Analysis
  Version: 1.1.0
  > 
  > test_check("survtmle")
  ── 1. Error: hazard_tmle with bounds of (0,1) gives same results as unbounded wi
  replacement has 1 row, data has 0
  1: survtmle(ftime = ftime, ftype = ftype, trt = trt, adjustVars = adjustVars, glm.trt = "W1 + W2", 
         glm.ftime = "trt + W1 + W2", glm.ctime = "trt + W1 + W2", method = "hazard", 
         t0 = 6, bounds = bf) at testthat/test-hazard_tmle.R:24
  2: hazard_tmle(ftime = clean$ftime, ftype = clean$ftype, trt = clean$trt, t0 = t0, adjustVars = clean$adjustVars, 
         SL.ftime = clean$SL.ftime, SL.ctime = clean$SL.ctime, SL.trt = clean$SL.trt, 
         glm.ftime = clean$glm.ftime, glm.ctime = clean$glm.ctime, glm.trt = clean$glm.trt, 
         returnIC = returnIC, returnModels = returnModels, ftypeOfInterest = ftypeOfInterest, 
         trtOfInterest = trtOfInterest, bounds = bounds, verbose = verbose, tol = tol, 
         maxIter = maxIter, gtol = gtol)
  3: makeDataList(dat = dat, J = allJ, ntrt = ntrt, uniqtrt = uniqtrt, t0 = t0, bounds = bounds)
  4: `[<-`(`*tmp*`, tmp, paste0("l", j), value = 0)
  5: `[<-.data.frame`(`*tmp*`, tmp, paste0("l", j), value = 0)
  6: stop(sprintf(ngettext(N, "replacement has %d row, data has %d", "replacement has %d rows, data has %d"), 
         N, n), domain = NA)
  
  ── 2. Error: mean_tmle with bounds of (0,1) gives same results as unbounded with
  replacement has 1 row, data has 0
  1: survtmle(ftime = ftime, ftype = ftype, trt = trt, adjustVars = adjustVars, glm.trt = "W1 + W2", 
         glm.ftime = "trt + W1 + W2", glm.ctime = "trt + W1 + W2", method = "mean", t0 = 6, 
         bounds = bf) at testthat/test-mean_tmle.R:23
  2: mean_tmle(ftime = clean$ftime, ftype = clean$ftype, trt = clean$trt, t0 = t0, adjustVars = clean$adjustVars, 
         SL.ftime = clean$SL.ftime, SL.ctime = clean$SL.ctime, SL.trt = clean$SL.trt, 
         glm.ftime = clean$glm.ftime, glm.ctime = clean$glm.ctime, glm.trt = clean$glm.trt, 
         returnIC = returnIC, returnModels = returnModels, ftypeOfInterest = ftypeOfInterest, 
         trtOfInterest = trtOfInterest, bounds = bounds, verbose = verbose, tol = tol, 
         Gcomp = Gcomp, gtol = gtol)
  3: makeDataList(dat = dat, J = allJ, ntrt = ntrt, uniqtrt = uniqtrt, t0 = t0, bounds = bounds)
  4: `[<-`(`*tmp*`, tmp, paste0("l", j), value = 0)
  5: `[<-.data.frame`(`*tmp*`, tmp, paste0("l", j), value = 0)
  6: stop(sprintf(ngettext(N, "replacement has %d row, data has %d", "replacement has %d rows, data has %d"), 
         N, n), domain = NA)
  
  ── 3. Error: mean_tmle with one ftypeOfInterest and one trtOfInterest gives same
  replacement has 1 row, data has 0
  1: survtmle(ftime = ftime, ftype = ftype, trt = trt, adjustVars = adjustVars, glm.trt = "1", 
         ftypeOfInterest = 1, trtOfInterest = 0, glm.ftime = "trt + W1 + W2", glm.ctime = "trt + W1 + W2", 
         method = "mean", t0 = 3, bounds = data.frame(t = 1:3, l1 = rep(0, 3), u1 = rep(0.99, 
             3))) at testthat/test-mean_tmle.R:135
  2: mean_tmle(ftime = clean$ftime, ftype = clean$ftype, trt = clean$trt, t0 = t0, adjustVars = clean$adjustVars, 
         SL.ftime = clean$SL.ftime, SL.ctime = clean$SL.ctime, SL.trt = clean$SL.trt, 
         glm.ftime = clean$glm.ftime, glm.ctime = clean$glm.ctime, glm.trt = clean$glm.trt, 
         returnIC = returnIC, returnModels = returnModels, ftypeOfInterest = ftypeOfInterest, 
         trtOfInterest = trtOfInterest, bounds = bounds, verbose = verbose, tol = tol, 
         Gcomp = Gcomp, gtol = gtol)
  3: makeDataList(dat = dat, J = allJ, ntrt = ntrt, uniqtrt = uniqtrt, t0 = t0, bounds = bounds)
  4: `[<-`(`*tmp*`, tmp, paste0("l", j), value = 0)
  5: `[<-.data.frame`(`*tmp*`, tmp, paste0("l", j), value = 0)
  6: stop(sprintf(ngettext(N, "replacement has %d row, data has %d", "replacement has %d rows, data has %d"), 
         N, n), domain = NA)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 46 SKIPPED: 1 FAILED: 3
  1. Error: hazard_tmle with bounds of (0,1) gives same results as unbounded with one failure type (@test-hazard_tmle.R#24) 
  2. Error: mean_tmle with bounds of (0,1) gives same results as unbounded with one failure type (@test-mean_tmle.R#23) 
  3. Error: mean_tmle with one ftypeOfInterest and one trtOfInterest gives same answer as multiple with bounds. (@test-mean_tmle.R#135) 
  
  Error: testthat unit tests failed
  Execution halted