Running ‘testthat.R’ [8s/22s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(cpi)
  > 
  > test_check("cpi")
  Saving _problems/test-check_args-7.R
  Saving _problems/test-check_args-21.R
  Saving _problems/test-check_args-36.R
  [ FAIL 3 | WARN 0 | SKIP 0 | PASS 1 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-check_args.R:6:3'): returns object of correct dimensions, regression ──
  Error in ``[.data.table`(data, , `:=`("task_hash", task[[1L]]$hash), by = "uhash")`: attempt access index 9/9 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─cpi::cpi(task = task, learner = lrn("regr.lm"), resampling = rsmp("holdout")) at test-check_args.R:6:3
   2.   └─cpi:::fit_learner(...)
   3.     └─mlr3::resample(task, learner, resampling, store_models = TRUE)
   4.       └─ResultData$new(data, data_extra, store_backends = store_backends)
   5.         └─mlr3 (local) initialize(...)
   6.           └─mlr3:::.__ResultData__initialize(...)
   7.             ├─data[, `:=`("task_hash", task[[1L]]$hash), by = "uhash"]
   8.             └─data.table:::`[.data.table`(...)
  ── Error ('test-check_args.R:19:3'): returns object of correct dimensions, classification ──
  Error in ``[.data.table`(data, , `:=`("task_hash", task[[1L]]$hash), by = "uhash")`: attempt access index 9/9 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─cpi::cpi(...) at test-check_args.R:19:3
   2.   └─cpi:::fit_learner(...)
   3.     └─mlr3::resample(task, learner, resampling, store_models = TRUE)
   4.       └─ResultData$new(data, data_extra, store_backends = store_backends)
   5.         └─mlr3 (local) initialize(...)
   6.           └─mlr3:::.__ResultData__initialize(...)
   7.             ├─data[, `:=`("task_hash", task[[1L]]$hash), by = "uhash"]
   8.             └─data.table:::`[.data.table`(...)
  ── Error ('test-check_args.R:33:3'): returns object of correct dimensions, group classification ──
  Error in ``[.data.table`(data, , `:=`("task_hash", task[[1L]]$hash), by = "uhash")`: attempt access index 9/9 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─cpi::cpi(...) at test-check_args.R:33:3
   2.   └─cpi:::fit_learner(...)
   3.     └─mlr3::resample(task, learner, resampling, store_models = TRUE)
   4.       └─ResultData$new(data, data_extra, store_backends = store_backends)
   5.         └─mlr3 (local) initialize(...)
   6.           └─mlr3:::.__ResultData__initialize(...)
   7.             ├─data[, `:=`("task_hash", task[[1L]]$hash), by = "uhash"]
   8.             └─data.table:::`[.data.table`(...)
  
  [ FAIL 3 | WARN 0 | SKIP 0 | PASS 1 ]
  Error:
  ! Test failures.
  Execution halted