Running ‘testthat.R’ [59s/75s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(RobinCar)
  > 
  > test_check("RobinCar")
  Loading required package: nnls
  Loading required package: gam
  Loading required package: splines
  Loading required package: foreach
  Loaded gam 1.22-5
  
  Super Learner
  Version: 2.0-29
  Package created on 2024-02-06
  
  Failed with error:  'there is no package called 'ranger''
  Error : loading required package (ranger) failed
  Failed with error:  'there is no package called 'ranger''
  Error : loading required package (ranger) failed
  Failed with error:  'there is no package called 'ranger''
  Error : loading required package (ranger) failed
  Failed with error:  'there is no package called 'ranger''
  Error : loading required package (ranger) failed
  Failed with error:  'there is no package called 'ranger''
  Error : loading required package (ranger) failed
  Failed with error:  'there is no package called 'ranger''
  Error : loading required package (ranger) failed
  Failed with error:  'there is no package called 'ranger''
  Error : loading required package (ranger) failed
  Failed with error:  'there is no package called 'ranger''
  Error : loading required package (ranger) failed
  Failed with error:  'there is no package called 'ranger''
  Error : loading required package (ranger) failed
  Failed with error:  'there is no package called 'ranger''
  Error : loading required package (ranger) failed
  .Failed with error:  'there is no package called 'ranger''
  Error : loading required package (ranger) failed
  Failed with error:  'there is no package called 'ranger''
  Error : loading required package (ranger) failed
  Failed with error:  'there is no package called 'ranger''
  Error : loading required package (ranger) failed
  Failed with error:  'there is no package called 'ranger''
  Error : loading required package (ranger) failed
  Failed with error:  'there is no package called 'ranger''
  Error : loading required package (ranger) failed
  Failed with error:  'there is no package called 'ranger''
  Error : loading required package (ranger) failed
  Failed with error:  'there is no package called 'ranger''
  Error : loading required package (ranger) failed
  Failed with error:  'there is no package called 'ranger''
  Error : loading required package (ranger) failed
  Failed with error:  'there is no package called 'ranger''
  Error : loading required package (ranger) failed
  Failed with error:  'there is no package called 'ranger''
  Error : loading required package (ranger) failed
  
  Attaching package: 'dplyr'
  
  The following object is masked from 'package:testthat':
  
      matches
  
  The following objects are masked from 'package:stats':
  
      filter, lag
  
  The following objects are masked from 'package:base':
  
      intersect, setdiff, setequal, union
  
  Joining with `by = join_by(t)`
  Joining with `by = join_by(t)`
  Joining with `by = join_by(t)`
  Joining with `by = join_by(t)`
  Joining with `by = join_by(t)`
  Joining with `by = join_by(t)`
  -- Attaching core tidyverse packages ------------------------ tidyverse 2.0.0 --
  v forcats   1.0.0     v readr     2.1.5
  v ggplot2   3.5.1     v stringr   1.5.1
  v lubridate 1.9.3     v tibble    3.2.1
  v purrr     1.0.2     v tidyr     1.3.1
  -- Conflicts ------------------------------------------ tidyverse_conflicts() --
  x purrr::accumulate()    masks foreach::accumulate()
  x readr::edition_get()   masks testthat::edition_get()
  x dplyr::filter()        masks stats::filter()
  x purrr::is_null()       masks testthat::is_null()
  x dplyr::lag()           masks stats::lag()
  x readr::local_edition() masks testthat::local_edition()
  x tidyr::matches()       masks dplyr::matches(), testthat::matches()
  x purrr::when()          masks foreach::when()
  i Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
  
  Attaching package: 'MASS'
  
  The following object is masked from 'package:dplyr':
  
      select
  
  Joining with `by = join_by(t)`
  Joining with `by = join_by(t)`
  Joining with `by = join_by(t)`
  Joining with `by = join_by(t)`
  [ FAIL 2 | WARN 165 | SKIP 1 | PASS 222 ]
  
  ══ Skipped tests (1) ═══════════════════════════════════════════════════════════
  • This works, but not in the testthat environment. (1): 'test-SL.R:51:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-SL.R:20:3'): simple super learner with random forest. ──────────
  Error in `SuperLearner::SuperLearner(Y = Y, X = X, SL.library = SL.library, 
      family = private$Y.type, env = private$sl.env, cvControl = CV)`: All algorithms dropped from library
  Backtrace:
       ▆
    1. └─RobinCar::robincar_SL(...) at test-SL.R:20:3
    2.   ├─RobinCar:::adjust(model, data)
    3.   └─RobinCar:::adjust.SLModel(model, data)
    4.     └─aipw$stratified_fit()
    5.       └─private$.f_lapply(...)
    6.         └─base::lapply(iter, func)
    7.           └─AIPW (local) FUN(X[[i]], ...)
    8.             └─self$sl.fit(...)
    9.               ├─base::suppressMessages(...)
   10.               │ └─base::withCallingHandlers(...)
   11.               └─SuperLearner::SuperLearner(...)
  ── Error ('test-SL.R:34:3'): simple super learner with median adjustment, random forest. ──
  Error in `SuperLearner::SuperLearner(Y = Y, X = X, SL.library = SL.library, 
      family = private$Y.type, env = private$sl.env, cvControl = CV)`: All algorithms dropped from library
  Backtrace:
       ▆
    1. └─RobinCar::robincar_SL_median(...) at test-SL.R:34:3
    2.   └─RobinCar::robincar_SL(...)
    3.     ├─RobinCar:::adjust(model, data)
    4.     └─RobinCar:::adjust.SLModel(model, data)
    5.       └─aipw$stratified_fit()
    6.         └─private$.f_lapply(...)
    7.           └─base::lapply(iter, func)
    8.             └─AIPW (local) FUN(X[[i]], ...)
    9.               └─self$sl.fit(...)
   10.                 ├─base::suppressMessages(...)
   11.                 │ └─base::withCallingHandlers(...)
   12.                 └─SuperLearner::SuperLearner(...)
  
  [ FAIL 2 | WARN 165 | SKIP 1 | PASS 222 ]
  Error: Test failures
  Execution halted