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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: autoplot.TuningInstanceSingleCrit
> ### Title: Plots for Tuning Instances
> ### Aliases: autoplot.TuningInstanceSingleCrit
> 
> ### ** Examples
> 
> if (requireNamespace("mlr3tuning") && requireNamespace("patchwork")) {
+   library(mlr3tuning)
+ 
+   learner = lrn("classif.rpart")
+   learner$param_set$values$cp = to_tune(0.001, 0.1)
+   learner$param_set$values$minsplit = to_tune(1, 10)
+ 
+   instance = TuningInstanceSingleCrit$new(
+     task = tsk("iris"),
+     learner = learner,
+     resampling = rsmp("holdout"),
+     measure = msr("classif.ce"),
+     terminator = trm("evals", n_evals = 10))
+ 
+   tuner = tnr("random_search")
+ 
+   tuner$optimize(instance)
+ 
+   # plot performance versus batch number
+   autoplot(instance, type = "performance")
+ 
+   # plot cp values versus performance
+   autoplot(instance, type = "marginal", cols_x = "cp")
+ 
+   # plot transformed parameter values versus batch number
+   autoplot(instance, type = "parameter", trafo = TRUE)
+ 
+   # plot parallel coordinates plot
+   autoplot(instance, type = "parallel")
+ 
+   # plot pairs
+   autoplot(instance, type = "pairs")
+ }
Loading required namespace: mlr3tuning
Loading required package: mlr3
Loading required package: paradox
TuningInstanceSingleCrit is deprecated. Use TuningInstanceBatchSingleCrit instead.
INFO  [14:08:43.534] [bbotk] Starting to optimize 2 parameter(s) with '<OptimizerBatchRandomSearch>' and '<TerminatorEvals> [n_evals=10, k=0]'
INFO  [14:08:43.644] [bbotk] Evaluating 1 configuration(s)
INFO  [14:08:43.663] [mlr3] Running benchmark with 1 resampling iterations
INFO  [14:08:43.674] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [14:08:43.715] [mlr3] Finished benchmark
INFO  [14:08:43.832] [bbotk] Result of batch 1:
INFO  [14:08:43.848] [bbotk]           cp minsplit classif.ce warnings errors runtime_learners
INFO  [14:08:43.848] [bbotk]  0.008452299        3       0.06        0      0            0.027
INFO  [14:08:43.848] [bbotk]                                 uhash
INFO  [14:08:43.848] [bbotk]  b3dbc18c-c930-4857-ae0a-44a5e7891583
INFO  [14:08:43.884] [bbotk] Evaluating 1 configuration(s)
INFO  [14:08:43.903] [mlr3] Running benchmark with 1 resampling iterations
INFO  [14:08:43.915] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [14:08:43.957] [mlr3] Finished benchmark
INFO  [14:08:44.062] [bbotk] Result of batch 2:
INFO  [14:08:44.078] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [14:08:44.078] [bbotk]  0.08961432        5       0.04        0      0            0.028
INFO  [14:08:44.078] [bbotk]                                 uhash
INFO  [14:08:44.078] [bbotk]  068e7598-b8b3-4cb2-af10-5e85918b8740
INFO  [14:08:44.129] [bbotk] Evaluating 1 configuration(s)
INFO  [14:08:44.173] [mlr3] Running benchmark with 1 resampling iterations
INFO  [14:08:44.197] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [14:08:44.282] [mlr3] Finished benchmark
INFO  [14:08:44.379] [bbotk] Result of batch 3:
INFO  [14:08:44.387] [bbotk]         cp minsplit classif.ce warnings errors runtime_learners
INFO  [14:08:44.387] [bbotk]  0.0418993        1       0.04        0      0            0.057
INFO  [14:08:44.387] [bbotk]                                 uhash
INFO  [14:08:44.387] [bbotk]  2c400a13-f045-46a9-afdc-dd8bf694c703
INFO  [14:08:44.413] [bbotk] Evaluating 1 configuration(s)
INFO  [14:08:44.432] [mlr3] Running benchmark with 1 resampling iterations
INFO  [14:08:44.444] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [14:08:44.515] [mlr3] Finished benchmark
INFO  [14:08:44.648] [bbotk] Result of batch 4:
INFO  [14:08:44.659] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [14:08:44.659] [bbotk]  0.03442392        7       0.04        0      0            0.051
INFO  [14:08:44.659] [bbotk]                                 uhash
INFO  [14:08:44.659] [bbotk]  7bc7f31c-7a3e-4910-ba56-1e9808666fc0
INFO  [14:08:44.694] [bbotk] Evaluating 1 configuration(s)
INFO  [14:08:44.724] [mlr3] Running benchmark with 1 resampling iterations
INFO  [14:08:44.739] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [14:08:44.800] [mlr3] Finished benchmark
INFO  [14:08:44.912] [bbotk] Result of batch 5:
INFO  [14:08:44.924] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [14:08:44.924] [bbotk]  0.03974457        4       0.04        0      0            0.038
INFO  [14:08:44.924] [bbotk]                                 uhash
INFO  [14:08:44.924] [bbotk]  16f7a78c-c048-4af9-a05f-c478077be184
INFO  [14:08:44.949] [bbotk] Evaluating 1 configuration(s)
INFO  [14:08:44.973] [mlr3] Running benchmark with 1 resampling iterations
INFO  [14:08:44.988] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [14:08:45.048] [mlr3] Finished benchmark
INFO  [14:08:45.120] [bbotk] Result of batch 6:
INFO  [14:08:45.126] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [14:08:45.126] [bbotk]  0.07436679        7       0.04        0      0            0.038
INFO  [14:08:45.126] [bbotk]                                 uhash
INFO  [14:08:45.126] [bbotk]  3a18576e-b54e-4c8f-bd83-1814c4b50e49
INFO  [14:08:45.150] [bbotk] Evaluating 1 configuration(s)
INFO  [14:08:45.168] [mlr3] Running benchmark with 1 resampling iterations
INFO  [14:08:45.181] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [14:08:45.281] [mlr3] Finished benchmark
INFO  [14:08:45.353] [bbotk] Result of batch 7:
INFO  [14:08:45.359] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [14:08:45.359] [bbotk]  0.01993475        9       0.04        0      0            0.085
INFO  [14:08:45.359] [bbotk]                                 uhash
INFO  [14:08:45.359] [bbotk]  d7da935d-df57-492e-bb9e-166cfefc31c8
INFO  [14:08:45.384] [bbotk] Evaluating 1 configuration(s)
INFO  [14:08:45.402] [mlr3] Running benchmark with 1 resampling iterations
INFO  [14:08:45.414] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [14:08:45.459] [mlr3] Finished benchmark
INFO  [14:08:45.539] [bbotk] Result of batch 8:
INFO  [14:08:45.546] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [14:08:45.546] [bbotk]  0.01973017        8       0.04        0      0            0.029
INFO  [14:08:45.546] [bbotk]                                 uhash
INFO  [14:08:45.546] [bbotk]  ee81cecf-186f-41ff-b240-1e87d81b2f51
INFO  [14:08:45.575] [bbotk] Evaluating 1 configuration(s)
INFO  [14:08:45.595] [mlr3] Running benchmark with 1 resampling iterations
INFO  [14:08:45.608] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [14:08:45.651] [mlr3] Finished benchmark
INFO  [14:08:45.735] [bbotk] Result of batch 9:
INFO  [14:08:45.742] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [14:08:45.742] [bbotk]  0.05521701        8       0.04        0      0            0.029
INFO  [14:08:45.742] [bbotk]                                 uhash
INFO  [14:08:45.742] [bbotk]  ce4da205-db08-435b-ab71-eaa7adf67e2e
INFO  [14:08:45.769] [bbotk] Evaluating 1 configuration(s)
INFO  [14:08:45.789] [mlr3] Running benchmark with 1 resampling iterations
INFO  [14:08:45.803] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [14:08:45.887] [mlr3] Finished benchmark
INFO  [14:08:46.016] [bbotk] Result of batch 10:
INFO  [14:08:46.022] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [14:08:46.022] [bbotk]  0.09280291        3       0.04        0      0            0.061
INFO  [14:08:46.022] [bbotk]                                 uhash
INFO  [14:08:46.022] [bbotk]  e1461f69-af03-4116-b25a-ba2792d2a6ec
INFO  [14:08:46.078] [bbotk] Finished optimizing after 10 evaluation(s)
INFO  [14:08:46.080] [bbotk] Result:
INFO  [14:08:46.085] [bbotk]          cp minsplit learner_param_vals  x_domain classif.ce
INFO  [14:08:46.085] [bbotk]       <num>    <int>             <list>    <list>      <num>
INFO  [14:08:46.085] [bbotk]  0.08961432        5          <list[3]> <list[2]>       0.04
Error in `fortify()`:
! `data` must be a <data.frame>, or an object coercible by `fortify()`,
  or a valid <data.frame>-like object coercible by `as.data.frame()`.
Caused by error in `.prevalidate_data_frame_like_object()`:
! `dim(data)` must return an <integer> of length 2.
Backtrace:
     ▆
  1. ├─ggplot2::autoplot(instance, type = "performance")
  2. └─mlr3viz:::autoplot.TuningInstanceSingleCrit(instance, type = "performance")
  3.   └─mlr3viz:::autoplot.OptimInstanceSingleCrit(...)
  4.     ├─ggplot2::fortify(object)
  5.     └─ggplot2:::fortify.default(object)
  6.       ├─rlang::try_fetch(...)
  7.       │ ├─base::tryCatch(...)
  8.       │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
  9.       │ │   └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
 10.       │ │     └─base (local) doTryCatch(return(expr), name, parentenv, handler)
 11.       │ └─base::withCallingHandlers(...)
 12.       └─ggplot2:::validate_as_data_frame(model)
 13.         └─ggplot2:::.prevalidate_data_frame_like_object(data)
 14.           └─cli::cli_abort(paste0("{.code dim(data)} must return ", "an {.cls integer} of length 2."))
 15.             └─rlang::abort(...)
Execution halted