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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### 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  [16:14:03.677] [mlr3] Running benchmark with 72 resampling iterations
INFO  [16:14:03.803] [mlr3] Applying learner 'regr.featureless' on task 'easy' (iter 1/18)
INFO  [16:14:03.868] [mlr3] Applying learner 'regr.featureless' on task 'easy' (iter 2/18)
INFO  [16:14:03.906] [mlr3] Applying learner 'regr.featureless' on task 'easy' (iter 3/18)
INFO  [16:14:03.917] [mlr3] Applying learner 'regr.featureless' on task 'easy' (iter 4/18)
INFO  [16:14:03.928] [mlr3] Applying learner 'regr.featureless' on task 'easy' (iter 5/18)
INFO  [16:14:03.948] [mlr3] Applying learner 'regr.featureless' on task 'easy' (iter 6/18)
INFO  [16:14:03.968] [mlr3] Applying learner 'regr.featureless' on task 'easy' (iter 7/18)
INFO  [16:14:03.980] [mlr3] Applying learner 'regr.featureless' on task 'easy' (iter 8/18)
INFO  [16:14:03.994] [mlr3] Applying learner 'regr.featureless' on task 'easy' (iter 9/18)
INFO  [16:14:04.006] [mlr3] Applying learner 'regr.featureless' on task 'easy' (iter 10/18)
INFO  [16:14:04.026] [mlr3] Applying learner 'regr.featureless' on task 'easy' (iter 11/18)
INFO  [16:14:04.038] [mlr3] Applying learner 'regr.featureless' on task 'easy' (iter 12/18)
INFO  [16:14:04.048] [mlr3] Applying learner 'regr.featureless' on task 'easy' (iter 13/18)
INFO  [16:14:04.059] [mlr3] Applying learner 'regr.featureless' on task 'easy' (iter 14/18)
INFO  [16:14:04.074] [mlr3] Applying learner 'regr.featureless' on task 'easy' (iter 15/18)
INFO  [16:14:04.086] [mlr3] Applying learner 'regr.featureless' on task 'easy' (iter 16/18)
INFO  [16:14:04.097] [mlr3] Applying learner 'regr.featureless' on task 'easy' (iter 17/18)
INFO  [16:14:04.119] [mlr3] Applying learner 'regr.featureless' on task 'easy' (iter 18/18)
INFO  [16:14:04.130] [mlr3] Applying learner 'regr.rpart' on task 'easy' (iter 1/18)
INFO  [16:14:04.152] [mlr3] Applying learner 'regr.rpart' on task 'easy' (iter 2/18)
INFO  [16:14:04.173] [mlr3] Applying learner 'regr.rpart' on task 'easy' (iter 3/18)
INFO  [16:14:04.202] [mlr3] Applying learner 'regr.rpart' on task 'easy' (iter 4/18)
INFO  [16:14:04.230] [mlr3] Applying learner 'regr.rpart' on task 'easy' (iter 5/18)
INFO  [16:14:04.264] [mlr3] Applying learner 'regr.rpart' on task 'easy' (iter 6/18)
INFO  [16:14:04.297] [mlr3] Applying learner 'regr.rpart' on task 'easy' (iter 7/18)
INFO  [16:14:04.316] [mlr3] Applying learner 'regr.rpart' on task 'easy' (iter 8/18)
INFO  [16:14:04.340] [mlr3] Applying learner 'regr.rpart' on task 'easy' (iter 9/18)
INFO  [16:14:04.371] [mlr3] Applying learner 'regr.rpart' on task 'easy' (iter 10/18)
INFO  [16:14:04.403] [mlr3] Applying learner 'regr.rpart' on task 'easy' (iter 11/18)
INFO  [16:14:04.435] [mlr3] Applying learner 'regr.rpart' on task 'easy' (iter 12/18)
INFO  [16:14:04.468] [mlr3] Applying learner 'regr.rpart' on task 'easy' (iter 13/18)
INFO  [16:14:04.508] [mlr3] Applying learner 'regr.rpart' on task 'easy' (iter 14/18)
INFO  [16:14:04.547] [mlr3] Applying learner 'regr.rpart' on task 'easy' (iter 15/18)
INFO  [16:14:04.574] [mlr3] Applying learner 'regr.rpart' on task 'easy' (iter 16/18)
INFO  [16:14:04.592] [mlr3] Applying learner 'regr.rpart' on task 'easy' (iter 17/18)
INFO  [16:14:04.609] [mlr3] Applying learner 'regr.rpart' on task 'easy' (iter 18/18)
INFO  [16:14:04.627] [mlr3] Applying learner 'regr.featureless' on task 'impossible' (iter 1/18)
INFO  [16:14:04.640] [mlr3] Applying learner 'regr.featureless' on task 'impossible' (iter 2/18)
INFO  [16:14:04.652] [mlr3] Applying learner 'regr.featureless' on task 'impossible' (iter 3/18)
INFO  [16:14:04.664] [mlr3] Applying learner 'regr.featureless' on task 'impossible' (iter 4/18)
INFO  [16:14:04.677] [mlr3] Applying learner 'regr.featureless' on task 'impossible' (iter 5/18)
INFO  [16:14:04.689] [mlr3] Applying learner 'regr.featureless' on task 'impossible' (iter 6/18)
INFO  [16:14:04.702] [mlr3] Applying learner 'regr.featureless' on task 'impossible' (iter 7/18)
INFO  [16:14:04.716] [mlr3] Applying learner 'regr.featureless' on task 'impossible' (iter 8/18)
INFO  [16:14:04.743] [mlr3] Applying learner 'regr.featureless' on task 'impossible' (iter 9/18)
INFO  [16:14:04.768] [mlr3] Applying learner 'regr.featureless' on task 'impossible' (iter 10/18)
INFO  [16:14:04.795] [mlr3] Applying learner 'regr.featureless' on task 'impossible' (iter 11/18)
INFO  [16:14:04.810] [mlr3] Applying learner 'regr.featureless' on task 'impossible' (iter 12/18)
INFO  [16:14:04.823] [mlr3] Applying learner 'regr.featureless' on task 'impossible' (iter 13/18)
INFO  [16:14:04.853] [mlr3] Applying learner 'regr.featureless' on task 'impossible' (iter 14/18)
INFO  [16:14:04.875] [mlr3] Applying learner 'regr.featureless' on task 'impossible' (iter 15/18)
INFO  [16:14:04.905] [mlr3] Applying learner 'regr.featureless' on task 'impossible' (iter 16/18)
INFO  [16:14:04.933] [mlr3] Applying learner 'regr.featureless' on task 'impossible' (iter 17/18)
INFO  [16:14:04.955] [mlr3] Applying learner 'regr.featureless' on task 'impossible' (iter 18/18)
INFO  [16:14:04.967] [mlr3] Applying learner 'regr.rpart' on task 'impossible' (iter 1/18)
INFO  [16:14:04.990] [mlr3] Applying learner 'regr.rpart' on task 'impossible' (iter 2/18)
INFO  [16:14:05.011] [mlr3] Applying learner 'regr.rpart' on task 'impossible' (iter 3/18)
INFO  [16:14:05.029] [mlr3] Applying learner 'regr.rpart' on task 'impossible' (iter 4/18)
INFO  [16:14:05.045] [mlr3] Applying learner 'regr.rpart' on task 'impossible' (iter 5/18)
INFO  [16:14:05.064] [mlr3] Applying learner 'regr.rpart' on task 'impossible' (iter 6/18)
INFO  [16:14:05.082] [mlr3] Applying learner 'regr.rpart' on task 'impossible' (iter 7/18)
INFO  [16:14:05.101] [mlr3] Applying learner 'regr.rpart' on task 'impossible' (iter 8/18)
INFO  [16:14:05.118] [mlr3] Applying learner 'regr.rpart' on task 'impossible' (iter 9/18)
INFO  [16:14:05.135] [mlr3] Applying learner 'regr.rpart' on task 'impossible' (iter 10/18)
INFO  [16:14:05.159] [mlr3] Applying learner 'regr.rpart' on task 'impossible' (iter 11/18)
INFO  [16:14:05.179] [mlr3] Applying learner 'regr.rpart' on task 'impossible' (iter 12/18)
INFO  [16:14:05.197] [mlr3] Applying learner 'regr.rpart' on task 'impossible' (iter 13/18)
INFO  [16:14:05.221] [mlr3] Applying learner 'regr.rpart' on task 'impossible' (iter 14/18)
INFO  [16:14:05.268] [mlr3] Applying learner 'regr.rpart' on task 'impossible' (iter 15/18)
INFO  [16:14:05.308] [mlr3] Applying learner 'regr.rpart' on task 'impossible' (iter 16/18)
INFO  [16:14:05.324] [mlr3] Applying learner 'regr.rpart' on task 'impossible' (iter 17/18)
INFO  [16:14:05.341] [mlr3] Applying learner 'regr.rpart' on task 'impossible' (iter 18/18)
INFO  [16:14:05.388] [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