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

> ### Name: BenchmarkAggr
> ### Title: Aggregated Benchmark Result Object
> ### Aliases: BenchmarkAggr
> 
> ### ** Examples
> 
> # Not restricted to mlr3 objects
> df = data.frame(tasks = factor(rep(c("A", "B"), each = 5),
+                                levels = c("A", "B")),
+                 learners = factor(paste0("L", 1:5)),
+                 RMSE = runif(10), MAE = runif(10))
> as_benchmark_aggr(df, task_id = "tasks", learner_id = "learners")
<BenchmarkAggr> of 10 rows with 2 tasks, 5 learners and 2 measures
     tasks learners       RMSE       MAE
    <fctr>   <fctr>      <num>     <num>
 1:      A       L1 0.26550866 0.2059746
 2:      A       L2 0.37212390 0.1765568
 3:      A       L3 0.57285336 0.6870228
 4:      A       L4 0.90820779 0.3841037
 5:      A       L5 0.20168193 0.7698414
 6:      B       L1 0.89838968 0.4976992
 7:      B       L2 0.94467527 0.7176185
 8:      B       L3 0.66079779 0.9919061
 9:      B       L4 0.62911404 0.3800352
10:      B       L5 0.06178627 0.7774452
> 
> if (requireNamespaces(c("mlr3", "rpart"))) {
+   library(mlr3)
+   task = tsks(c("pima", "spam"))
+   learns = lrns(c("classif.featureless", "classif.rpart"))
+   bm = benchmark(benchmark_grid(task, learns, rsmp("cv", folds = 2)))
+ 
+   # coercion
+   as_benchmark_aggr(bm)
+ }
INFO  [17:44:25.371] [mlr3] Running benchmark with 8 resampling iterations
INFO  [17:44:26.040] [mlr3] Applying learner 'classif.featureless' on task 'pima' (iter 1/2)
INFO  [17:44:26.228] [mlr3] Applying learner 'classif.featureless' on task 'pima' (iter 2/2)
INFO  [17:44:26.356] [mlr3] Applying learner 'classif.rpart' on task 'pima' (iter 1/2)
INFO  [17:44:26.618] [mlr3] Applying learner 'classif.rpart' on task 'pima' (iter 2/2)
INFO  [17:44:26.766] [mlr3] Applying learner 'classif.featureless' on task 'spam' (iter 1/2)
INFO  [17:44:26.846] [mlr3] Applying learner 'classif.featureless' on task 'spam' (iter 2/2)
INFO  [17:44:26.964] [mlr3] Applying learner 'classif.rpart' on task 'spam' (iter 1/2)
INFO  [17:44:27.253] [mlr3] Applying learner 'classif.rpart' on task 'spam' (iter 2/2)
INFO  [17:44:27.454] [mlr3] Finished benchmark
Error in `[.data.table`(data, , `:=`("task_hash", task[[1L]]$hash), by = "uhash") : 
  attempt access index 9/9 in VECTOR_ELT
Calls: benchmark ... initialize -> .__ResultData__initialize -> [ -> [.data.table
Execution halted