Running 'testthat.R' [44s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(ltmle)
  > 
  > test_check("ltmle")
  seed set to 1
  Estimator:  tmle 
              Estimate Std. Error CI 2.5% CI 97.5% p-value
  (Intercept)  -3.5478         NA      NA       NA      NA
  time          0.5402         NA      NA       NA      NA
  switch.time       NA         NA      NA       NA      NA
  deterministic.g.function is inconsistent with data.
  After setting Anodes to abar, the data looks like this:
             W A1 A2 Y
  1  0.2988809  0  1 1
  2 -2.2654391  0  1 0
  3 -0.4206760  0  1 1
  4 -0.1220258  0  1 0
  5 -0.3792042  0  1 1
  6 -0.8394849  0  1 1
  -- 1. Failure: invalid inputs throw errors 3 (@test-ErrorHandling.R#49)  -------
  `ltmle(...)` threw an error with unexpected message.
  Expected match: "all levels of data"
  Actual message: "in data, all Cnodes should be factors with two levels, 'censored' and 'uncensored'\n See ?BinaryToCensoring \n (binary is also accepted, where 0=censored, 1=uncensored, but this is not recommended)"
  Backtrace:
   1. testthat::expect_error(...)
   6. ltmle::ltmle(...)
   7. ltmle:::CreateInputs(...)
   8. ltmle:::ConvertCensoringNodes(...)
  
  Estimator:  tmle 
  Call:
  ltmle(data = data, Anodes = "A", Ynodes = "Y", abar = 1, gbounds = c(0, 
      1), estimate.time = FALSE)
  
     Parameter Estimate:  0.82776 
      Estimated Std Err:  139.68 
                p-value:  0.99527 
      95% Conf Interval: (0, 1) 
  
  Error in solve.default(a) : 
    Lapack routine dgesv: system is exactly singular: U[2,2] = 0
  Error in solve.default(a, b) : 
    Lapack routine dgesv: system is exactly singular: U[2,2] = 0
  Call:
  ltmle(data = data.frame(W, A, Y), Anodes = "A", Ynodes = "Y", 
      abar = 1, estimate.time = F)
  
  TMLE Estimate:  0.7378272 
  Estimator:  tmle 
  Call:
  ltmle(data = data.frame(W, A, Y), Anodes = "A", Ynodes = "Y", 
      abar = 1, estimate.time = F)
  
     Parameter Estimate:  0.73783 
      Estimated Std Err:  0.1306 
                p-value:  4.1819e-06 
      95% Conf Interval: (0.47072, 1) 
  
  Call:
  ltmle(data = data.frame(W, A, Y), Anodes = "A", Ynodes = "Y", 
      abar = list(1, 0), estimate.time = F)
  
  Use summary(...) to get estimates, standard errors, p-values, and confidence intervals for treatment EYd, control EYd, additive effect, relative risk, and odds ratio.
  Estimator:  tmle 
  Call:
  ltmle(data = data.frame(W, A, Y), Anodes = "A", Ynodes = "Y", 
      abar = list(1, 0), estimate.time = F)
  
  Treatment Estimate:
     Parameter Estimate:  0.73783 
      Estimated Std Err:  0.1306 
                p-value:  4.1819e-06 
      95% Conf Interval: (0.47072, 1) 
  
  Control Estimate:
     Parameter Estimate:  0.57808 
      Estimated Std Err:  0.12179 
                p-value:  5.1274e-05 
      95% Conf Interval: (0.329, 0.82716) 
  
  Additive Treatment Effect:
     Parameter Estimate:  0.15975 
      Estimated Std Err:  0.16985 
                p-value:  0.35474 
      95% Conf Interval: (-0.18765, 0.50714) 
  
  Relative Risk:
     Parameter Estimate:  1.2763 
    Est Std Err log(RR):  0.25812 
                p-value:  0.35232 
      95% Conf Interval: (0.75283, 2.1639) 
  
  Odds Ratio:
     Parameter Estimate:  2.054 
    Est Std Err log(OR):  0.80876 
                p-value:  0.38078 
      95% Conf Interval: (0.39287, 10.739) 
  
  Call:
  ltmle(data = data.frame(W, A, Y), Anodes = "A", Ynodes = "Y", 
      abar = 1, estimate.time = F)
  
  TMLE Estimate:  0.7378272 
  Estimator:  tmle 
  Call:
  ltmle(data = data.frame(W, A, Y), Anodes = "A", Ynodes = "Y", 
      abar = 1, estimate.time = F)
  
     Parameter Estimate:  0.73783 
      Estimated Std Err:  0.1306 
                p-value:  4.1819e-06 
      95% Conf Interval: (0.47072, 1) 
  
  Call:
  ltmle(data = data.frame(W, A, Y), Anodes = "A", Ynodes = "Y", 
      abar = list(1, 0), estimate.time = F)
  
  Use summary(...) to get estimates, standard errors, p-values, and confidence intervals for treatment EYd, control EYd, additive effect, relative risk, and odds ratio.
  Estimator:  tmle 
  Call:
  ltmle(data = data.frame(W, A, Y), Anodes = "A", Ynodes = "Y", 
      abar = list(1, 0), estimate.time = F)
  
  Treatment Estimate:
     Parameter Estimate:  0.73783 
      Estimated Std Err:  0.1306 
                p-value:  4.1819e-06 
      95% Conf Interval: (0.47072, 1) 
  
  Control Estimate:
     Parameter Estimate:  0.57808 
      Estimated Std Err:  0.12179 
                p-value:  5.1274e-05 
      95% Conf Interval: (0.329, 0.82716) 
  
  Additive Treatment Effect:
     Parameter Estimate:  0.15975 
      Estimated Std Err:  0.16985 
                p-value:  0.35474 
      95% Conf Interval: (-0.18765, 0.50714) 
  
  Relative Risk:
     Parameter Estimate:  1.2763 
    Est Std Err log(RR):  0.25812 
                p-value:  0.35232 
      95% Conf Interval: (0.75283, 2.1639) 
  
  Odds Ratio:
     Parameter Estimate:  2.054 
    Est Std Err log(OR):  0.80876 
                p-value:  0.38078 
      95% Conf Interval: (0.39287, 10.739) 
  
  Call:
  ltmle(data = data.frame(W, A, Y), Anodes = "A", Ynodes = "Y", 
      abar = 1, estimate.time = F, gcomp = T)
  
  GCOMP Estimate:  0.7758063 
  Estimator:  gcomp 
  Warning: inference for gcomp is not accurate! It is based on TMLE influence curves.
  Call:
  ltmle(data = data.frame(W, A, Y), Anodes = "A", Ynodes = "Y", 
      abar = 1, estimate.time = F, gcomp = T)
  
     Parameter Estimate:  0.77581 
      Estimated Std Err:  0.12907 
                p-value:  1.5474e-06 
      95% Conf Interval: (0.51182, 1) 
  
  == testthat results  ===========================================================
  [ OK: 167 | SKIPPED: 4 | WARNINGS: 7 | FAILED: 1 ]
  1. Failure: invalid inputs throw errors 3 (@test-ErrorHandling.R#49) 
  
  Error: testthat unit tests failed
  Execution halted