Running examples in ‘xtdml-Ex.R’ failed
The error most likely occurred in:

> ### Name: xtdml_plr
> ### Title: DML Method for Partially Linear Panel Models
> ### Aliases: xtdml_plr
> 
> ### ** Examples
> 
> # An illustrative example using a regression tree (`rpart`)
> library(mlr3)
> library(rpart)
> library(mlr3tuning)
Loading required package: paradox
> set.seed(1234)
> 
> # Generate simulated dataset
> data = make_plpr_data(n_obs = 100, t_per = 5, dim_x = 10, theta = 0.5, rho=0.8)
> 
> x_cols  = paste0("X", 1:10)
> 
> # Set up DML data environment
> obj_xtdml_data = xtdml_data_from_data_frame(data,
+                 x_cols = x_cols,  y_col = "y", d_cols = "d",
+                 panel_id = "id",
+                 time_id = "time",
+                 approach = "fd-exact")
> 
> # Set up DML estimation environment
>  learner = lrn("regr.rpart")
>  ml_l = learner$clone()
>  ml_m = learner$clone()
> 
>  obj_xtdml = xtdml_plr$new(obj_xtdml_data,
+                            ml_l = ml_l, ml_m = ml_m,
+                            score = "orth-PO", n_folds = 3)
> # Set up a list of parameter grids
> param_grid = list("ml_l" = ps(cp = p_dbl(lower = 0.01, upper = 0.02),
+                             maxdepth = p_int(lower = 2, upper = 10)),
+                   "ml_m" = ps(cp = p_dbl(lower = 0.01, upper = 0.02),
+                             maxdepth = p_int(lower = 2, upper = 10)))
> 
> tune_settings = list(n_folds_tune = 3,
+                    rsmp_tune = mlr3::rsmp("cv", folds = 3),
+                    terminator = mlr3tuning::trm("evals", n_evals = 5),
+                    tuner = tnr("grid_search", resolution = 10))
> 
> obj_xtdml$tune(param_set = param_grid, tune_settings = tune_settings)
INFO  [13:04:11.985] [bbotk] Starting to optimize 2 parameter(s) with '<OptimizerBatchGridSearch>' and '<TerminatorEvals> [n_evals=5, k=0]'
INFO  [13:04:12.411] [bbotk] Evaluating 1 configuration(s)
INFO  [13:04:12.525] [mlr3] Running benchmark with 3 resampling iterations
INFO  [13:04:13.008] [mlr3] Applying learner 'regr.rpart' on task 'nuis_l' (iter 1/3)
INFO  [13:04:13.143] [mlr3] Applying learner 'regr.rpart' on task 'nuis_l' (iter 2/3)
INFO  [13:04:13.250] [mlr3] Applying learner 'regr.rpart' on task 'nuis_l' (iter 3/3)
INFO  [13:04:13.323] [mlr3] Finished benchmark
Error in `[.data.table`(data, , `:=`("task_hash", task[[1L]]$hash), by = "uhash") : 
  attempt access index 9/9 in VECTOR_ELT
Calls: <Anonymous> ... initialize -> .__ResultData__initialize -> [ -> [.data.table
Execution halted