Running ‘testthat.R’ [73s/90s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(gKRLS)
  Loading required package: mgcv
  Loading required package: nlme
  This is mgcv 1.9-4. For overview type '?mgcv'.
  Loading required package: sandwich
  > 
  > test_check("gKRLS")
  INFO  [16:13:05.341] [mlr3] Applying learner 'classif.bam' on task 'nuis_m' (iter 1/2)
  INFO  [16:13:06.116] [mlr3] Applying learner 'classif.bam' on task 'nuis_m' (iter 2/2)
  Saving _problems/test_DML-42.R
  Bivariate smoothing example
  Bivariate smoothing example
  [1] "derivative"
  [1] "second_derivative"
  Distribution of Pointwise Marginal Effects: N = 200
       (Intercept)         x1          x2
  25% -0.001900025 -0.1139238 -0.07130014
  50% -0.001843025  0.0601889 -0.05431280
  75% -0.001574822  0.2717062 -0.02734085
  
  Summary of Average Marginal Effects
                       est         se       t.stat     p.value
  (Intercept) -0.001673628 0.20599894 -0.008124448 0.993526152
  x1           0.098231155 0.03707063  2.649837808 0.008725682
  x2          -0.047751134 0.03785936 -1.261276966 0.208742463
    variable       type         est         se         t     p.value
  1       x1 derivative  0.09823115 0.03707063  2.649838 0.008725683
  2       x2 derivative -0.04775113 0.03785917 -1.261283 0.208740224
  [ FAIL 1 | WARN 0 | SKIP 1 | PASS 204 ]
  
  ══ Skipped tests (1) ═══════════════════════════════════════════════════════════
  • empty test (1): 'test_aaa.R:2:1'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test_DML.R:37:5'): Test DoubleML ────────────────────────────────────
  Error in ``[.data.table`(data, , `:=`("task_hash", task[[1L]]$hash), by = "uhash")`: attempt access index 9/9 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─DoubleMLIRM$new(data = dml_data, n_folds = 2, ml_g = double_bam_1, ... at test_DML.R:37:5
   2.   └─private$nuisance_est(private$get__smpls())
   3.     └─DoubleML:::dml_cv_predict(...)
   4.       └─mlr3::resample(task_pred, ml_learner, resampling_smpls, store_models = TRUE)
   5.         └─ResultData$new(data, data_extra, store_backends = store_backends)
   6.           └─mlr3 (local) initialize(...)
   7.             └─mlr3:::.__ResultData__initialize(...)
   8.               ├─data[, `:=`("task_hash", task[[1L]]$hash), by = "uhash"]
   9.               └─data.table:::`[.data.table`(...)
  
  [ FAIL 1 | WARN 0 | SKIP 1 | PASS 204 ]
  Error:
  ! Test failures.
  Execution halted