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

> ### Name: score
> ### Title: Score benchmark results
> ### Aliases: score
> 
> ### ** Examples
> 
> 
> N <- 100
> library(data.table)
> set.seed(1)
> reg.dt <- data.table(
+   x=runif(N, -2, 2),
+   person=rep(1:2, each=0.5*N))
> reg.pattern.list <- list(
+   easy=function(x, person)x^2,
+   impossible=function(x, person)(x^2+person*3)*(-1)^person)
> reg.task.list <- list()
> for(pattern in names(reg.pattern.list)){
+   f <- reg.pattern.list[[pattern]]
+   yname <- paste0("y_",pattern)
+   reg.dt[, (yname) := f(x,person)+rnorm(N, sd=0.5)][]
+   task.dt <- reg.dt[, c("x","person",yname), with=FALSE]
+   task.obj <- mlr3::TaskRegr$new(
+     pattern, task.dt, target=yname)
+   task.obj$col_roles$stratum <- "person"
+   task.obj$col_roles$subset <- "person"
+   reg.task.list[[pattern]] <- task.obj
+ }
> same_other <- mlr3resampling::ResamplingSameOtherSizesCV$new()
> reg.learner.list <- list(
+   mlr3::LearnerRegrFeatureless$new())
> if(requireNamespace("rpart")){
+   reg.learner.list$rpart <- mlr3::LearnerRegrRpart$new()
+ }
Loading required namespace: rpart
> (bench.grid <- mlr3::benchmark_grid(
+   reg.task.list,
+   reg.learner.list,
+   same_other))
         task          learner          resampling
       <char>           <char>              <char>
1:       easy regr.featureless same_other_sizes_cv
2:       easy       regr.rpart same_other_sizes_cv
3: impossible regr.featureless same_other_sizes_cv
4: impossible       regr.rpart same_other_sizes_cv
> bench.result <- mlr3::benchmark(bench.grid)
INFO  [22:53:15.998] [mlr3] Running benchmark with 72 resampling iterations
INFO  [22:53:16.413] [mlr3] Applying learner 'regr.featureless' on task 'easy' (iter 1/18)
INFO  [22:53:16.531] [mlr3] Applying learner 'regr.featureless' on task 'easy' (iter 2/18)
INFO  [22:53:16.581] [mlr3] Applying learner 'regr.featureless' on task 'easy' (iter 3/18)
INFO  [22:53:16.640] [mlr3] Applying learner 'regr.featureless' on task 'easy' (iter 4/18)
INFO  [22:53:16.697] [mlr3] Applying learner 'regr.featureless' on task 'easy' (iter 5/18)
INFO  [22:53:16.749] [mlr3] Applying learner 'regr.featureless' on task 'easy' (iter 6/18)
INFO  [22:53:16.804] [mlr3] Applying learner 'regr.featureless' on task 'easy' (iter 7/18)
INFO  [22:53:16.862] [mlr3] Applying learner 'regr.featureless' on task 'easy' (iter 8/18)
INFO  [22:53:16.906] [mlr3] Applying learner 'regr.featureless' on task 'easy' (iter 9/18)
INFO  [22:53:16.932] [mlr3] Applying learner 'regr.featureless' on task 'easy' (iter 10/18)
INFO  [22:53:16.960] [mlr3] Applying learner 'regr.featureless' on task 'easy' (iter 11/18)
INFO  [22:53:16.986] [mlr3] Applying learner 'regr.featureless' on task 'easy' (iter 12/18)
INFO  [22:53:17.013] [mlr3] Applying learner 'regr.featureless' on task 'easy' (iter 13/18)
INFO  [22:53:17.055] [mlr3] Applying learner 'regr.featureless' on task 'easy' (iter 14/18)
INFO  [22:53:17.081] [mlr3] Applying learner 'regr.featureless' on task 'easy' (iter 15/18)
INFO  [22:53:17.108] [mlr3] Applying learner 'regr.featureless' on task 'easy' (iter 16/18)
INFO  [22:53:17.147] [mlr3] Applying learner 'regr.featureless' on task 'easy' (iter 17/18)
INFO  [22:53:17.191] [mlr3] Applying learner 'regr.featureless' on task 'easy' (iter 18/18)
INFO  [22:53:17.240] [mlr3] Applying learner 'regr.rpart' on task 'easy' (iter 1/18)
INFO  [22:53:17.322] [mlr3] Applying learner 'regr.rpart' on task 'easy' (iter 2/18)
INFO  [22:53:17.389] [mlr3] Applying learner 'regr.rpart' on task 'easy' (iter 3/18)
INFO  [22:53:17.457] [mlr3] Applying learner 'regr.rpart' on task 'easy' (iter 4/18)
INFO  [22:53:17.503] [mlr3] Applying learner 'regr.rpart' on task 'easy' (iter 5/18)
INFO  [22:53:17.540] [mlr3] Applying learner 'regr.rpart' on task 'easy' (iter 6/18)
INFO  [22:53:17.577] [mlr3] Applying learner 'regr.rpart' on task 'easy' (iter 7/18)
INFO  [22:53:17.641] [mlr3] Applying learner 'regr.rpart' on task 'easy' (iter 8/18)
INFO  [22:53:17.707] [mlr3] Applying learner 'regr.rpart' on task 'easy' (iter 9/18)
INFO  [22:53:17.771] [mlr3] Applying learner 'regr.rpart' on task 'easy' (iter 10/18)
INFO  [22:53:17.846] [mlr3] Applying learner 'regr.rpart' on task 'easy' (iter 11/18)
INFO  [22:53:17.909] [mlr3] Applying learner 'regr.rpart' on task 'easy' (iter 12/18)
INFO  [22:53:18.002] [mlr3] Applying learner 'regr.rpart' on task 'easy' (iter 13/18)
INFO  [22:53:18.097] [mlr3] Applying learner 'regr.rpart' on task 'easy' (iter 14/18)
INFO  [22:53:18.212] [mlr3] Applying learner 'regr.rpart' on task 'easy' (iter 15/18)
INFO  [22:53:18.297] [mlr3] Applying learner 'regr.rpart' on task 'easy' (iter 16/18)
INFO  [22:53:18.420] [mlr3] Applying learner 'regr.rpart' on task 'easy' (iter 17/18)
INFO  [22:53:18.504] [mlr3] Applying learner 'regr.rpart' on task 'easy' (iter 18/18)
INFO  [22:53:18.561] [mlr3] Applying learner 'regr.featureless' on task 'impossible' (iter 1/18)
INFO  [22:53:18.638] [mlr3] Applying learner 'regr.featureless' on task 'impossible' (iter 2/18)
INFO  [22:53:18.708] [mlr3] Applying learner 'regr.featureless' on task 'impossible' (iter 3/18)
INFO  [22:53:18.757] [mlr3] Applying learner 'regr.featureless' on task 'impossible' (iter 4/18)
INFO  [22:53:18.804] [mlr3] Applying learner 'regr.featureless' on task 'impossible' (iter 5/18)
INFO  [22:53:18.873] [mlr3] Applying learner 'regr.featureless' on task 'impossible' (iter 6/18)
INFO  [22:53:18.944] [mlr3] Applying learner 'regr.featureless' on task 'impossible' (iter 7/18)
INFO  [22:53:19.013] [mlr3] Applying learner 'regr.featureless' on task 'impossible' (iter 8/18)
INFO  [22:53:19.067] [mlr3] Applying learner 'regr.featureless' on task 'impossible' (iter 9/18)
INFO  [22:53:19.175] [mlr3] Applying learner 'regr.featureless' on task 'impossible' (iter 10/18)
INFO  [22:53:19.239] [mlr3] Applying learner 'regr.featureless' on task 'impossible' (iter 11/18)
INFO  [22:53:19.316] [mlr3] Applying learner 'regr.featureless' on task 'impossible' (iter 12/18)
INFO  [22:53:19.362] [mlr3] Applying learner 'regr.featureless' on task 'impossible' (iter 13/18)
INFO  [22:53:19.419] [mlr3] Applying learner 'regr.featureless' on task 'impossible' (iter 14/18)
INFO  [22:53:19.471] [mlr3] Applying learner 'regr.featureless' on task 'impossible' (iter 15/18)
INFO  [22:53:19.528] [mlr3] Applying learner 'regr.featureless' on task 'impossible' (iter 16/18)
INFO  [22:53:19.587] [mlr3] Applying learner 'regr.featureless' on task 'impossible' (iter 17/18)
INFO  [22:53:19.643] [mlr3] Applying learner 'regr.featureless' on task 'impossible' (iter 18/18)
INFO  [22:53:19.672] [mlr3] Applying learner 'regr.rpart' on task 'impossible' (iter 1/18)
INFO  [22:53:19.708] [mlr3] Applying learner 'regr.rpart' on task 'impossible' (iter 2/18)
INFO  [22:53:19.751] [mlr3] Applying learner 'regr.rpart' on task 'impossible' (iter 3/18)
INFO  [22:53:19.826] [mlr3] Applying learner 'regr.rpart' on task 'impossible' (iter 4/18)
INFO  [22:53:19.909] [mlr3] Applying learner 'regr.rpart' on task 'impossible' (iter 5/18)
INFO  [22:53:19.999] [mlr3] Applying learner 'regr.rpart' on task 'impossible' (iter 6/18)
INFO  [22:53:20.048] [mlr3] Applying learner 'regr.rpart' on task 'impossible' (iter 7/18)
INFO  [22:53:20.104] [mlr3] Applying learner 'regr.rpart' on task 'impossible' (iter 8/18)
INFO  [22:53:20.157] [mlr3] Applying learner 'regr.rpart' on task 'impossible' (iter 9/18)
INFO  [22:53:20.248] [mlr3] Applying learner 'regr.rpart' on task 'impossible' (iter 10/18)
INFO  [22:53:20.341] [mlr3] Applying learner 'regr.rpart' on task 'impossible' (iter 11/18)
INFO  [22:53:20.439] [mlr3] Applying learner 'regr.rpart' on task 'impossible' (iter 12/18)
INFO  [22:53:20.532] [mlr3] Applying learner 'regr.rpart' on task 'impossible' (iter 13/18)
INFO  [22:53:20.611] [mlr3] Applying learner 'regr.rpart' on task 'impossible' (iter 14/18)
INFO  [22:53:20.677] [mlr3] Applying learner 'regr.rpart' on task 'impossible' (iter 15/18)
INFO  [22:53:20.726] [mlr3] Applying learner 'regr.rpart' on task 'impossible' (iter 16/18)
INFO  [22:53:20.808] [mlr3] Applying learner 'regr.rpart' on task 'impossible' (iter 17/18)
INFO  [22:53:20.886] [mlr3] Applying learner 'regr.rpart' on task 'impossible' (iter 18/18)
INFO  [22:53:21.016] [mlr3] Finished benchmark
> bench.score <- mlr3resampling::score(bench.result)
> if(require(animint2)){
+   ggplot()+
+     geom_point(aes(
+       regr.mse, train.subsets, color=algorithm),
+       shape=1,
+       data=bench.score)+
+     facet_grid(
+       test.subset ~ task_id,
+       labeller=label_both,
+       scales="free")+
+     scale_x_log10()
+ }
Loading required package: animint2
Error: Cannot create zero-length unit vector ("unit" subsetting)
Execution halted