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  [00:58:34.310] [bbotk] Starting to optimize 2 parameter(s) with '<OptimizerBatchRandomSearch>' and '<TerminatorEvals> [n_evals=10, k=0]'
INFO  [00:58:34.432] [bbotk] Evaluating 1 configuration(s)
INFO  [00:58:34.461] [mlr3] Running benchmark with 1 resampling iterations
INFO  [00:58:34.483] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [00:58:34.543] [mlr3] Finished benchmark
INFO  [00:58:34.635] [bbotk] Result of batch 1:
INFO  [00:58:34.640] [bbotk]           cp minsplit classif.ce warnings errors runtime_learners
INFO  [00:58:34.640] [bbotk]  0.008452299        3       0.06        0      0            0.049
INFO  [00:58:34.640] [bbotk]                                 uhash
INFO  [00:58:34.640] [bbotk]  d7f8b8c5-e58d-4e89-8f25-ba0c2aa6d9a5
INFO  [00:58:34.675] [bbotk] Evaluating 1 configuration(s)
INFO  [00:58:34.689] [mlr3] Running benchmark with 1 resampling iterations
INFO  [00:58:34.699] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [00:58:34.777] [mlr3] Finished benchmark
INFO  [00:58:34.916] [bbotk] Result of batch 2:
INFO  [00:58:34.938] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [00:58:34.938] [bbotk]  0.08961432        5       0.04        0      0            0.054
INFO  [00:58:34.938] [bbotk]                                 uhash
INFO  [00:58:34.938] [bbotk]  14a56b9a-6773-4a5b-9fa0-54359fc0a4f5
INFO  [00:58:34.973] [bbotk] Evaluating 1 configuration(s)
INFO  [00:58:35.012] [mlr3] Running benchmark with 1 resampling iterations
INFO  [00:58:35.025] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [00:58:35.058] [mlr3] Finished benchmark
INFO  [00:58:35.120] [bbotk] Result of batch 3:
INFO  [00:58:35.125] [bbotk]         cp minsplit classif.ce warnings errors runtime_learners
INFO  [00:58:35.125] [bbotk]  0.0418993        1       0.04        0      0            0.022
INFO  [00:58:35.125] [bbotk]                                 uhash
INFO  [00:58:35.125] [bbotk]  221a84f3-bebc-4a4e-b48a-167258263c12
INFO  [00:58:35.187] [bbotk] Evaluating 1 configuration(s)
INFO  [00:58:35.217] [mlr3] Running benchmark with 1 resampling iterations
INFO  [00:58:35.238] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [00:58:35.297] [mlr3] Finished benchmark
INFO  [00:58:35.418] [bbotk] Result of batch 4:
INFO  [00:58:35.423] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [00:58:35.423] [bbotk]  0.03442392        7       0.04        0      0            0.048
INFO  [00:58:35.423] [bbotk]                                 uhash
INFO  [00:58:35.423] [bbotk]  16fc54d9-c1be-4e92-9516-1d0475b0a111
INFO  [00:58:35.475] [bbotk] Evaluating 1 configuration(s)
INFO  [00:58:35.505] [mlr3] Running benchmark with 1 resampling iterations
INFO  [00:58:35.515] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [00:58:35.585] [mlr3] Finished benchmark
INFO  [00:58:35.711] [bbotk] Result of batch 5:
INFO  [00:58:35.716] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [00:58:35.716] [bbotk]  0.03974457        4       0.04        0      0            0.019
INFO  [00:58:35.716] [bbotk]                                 uhash
INFO  [00:58:35.716] [bbotk]  932f3920-eb3d-4cb2-b415-7719ce2bb03d
INFO  [00:58:35.759] [bbotk] Evaluating 1 configuration(s)
INFO  [00:58:35.785] [mlr3] Running benchmark with 1 resampling iterations
INFO  [00:58:35.793] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [00:58:35.862] [mlr3] Finished benchmark
INFO  [00:58:35.970] [bbotk] Result of batch 6:
INFO  [00:58:35.987] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [00:58:35.987] [bbotk]  0.07436679        7       0.04        0      0            0.045
INFO  [00:58:35.987] [bbotk]                                 uhash
INFO  [00:58:35.987] [bbotk]  bb0f8e8a-cc85-4b53-99e1-61511bf3826b
INFO  [00:58:36.022] [bbotk] Evaluating 1 configuration(s)
INFO  [00:58:36.051] [mlr3] Running benchmark with 1 resampling iterations
INFO  [00:58:36.075] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [00:58:36.123] [mlr3] Finished benchmark
INFO  [00:58:36.339] [bbotk] Result of batch 7:
INFO  [00:58:36.344] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [00:58:36.344] [bbotk]  0.01993475        9       0.04        0      0             0.02
INFO  [00:58:36.344] [bbotk]                                 uhash
INFO  [00:58:36.344] [bbotk]  fb3ba55c-3871-4994-9548-49e3eddf2f74
INFO  [00:58:36.395] [bbotk] Evaluating 1 configuration(s)
INFO  [00:58:36.432] [mlr3] Running benchmark with 1 resampling iterations
INFO  [00:58:36.473] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [00:58:36.560] [mlr3] Finished benchmark
INFO  [00:58:36.696] [bbotk] Result of batch 8:
INFO  [00:58:36.701] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [00:58:36.701] [bbotk]  0.01973017        8       0.04        0      0            0.076
INFO  [00:58:36.701] [bbotk]                                 uhash
INFO  [00:58:36.701] [bbotk]  138e90e3-b4c2-48d3-9d3d-473e312ac9ef
INFO  [00:58:36.743] [bbotk] Evaluating 1 configuration(s)
INFO  [00:58:36.772] [mlr3] Running benchmark with 1 resampling iterations
INFO  [00:58:36.788] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [00:58:36.848] [mlr3] Finished benchmark
INFO  [00:58:36.943] [bbotk] Result of batch 9:
INFO  [00:58:36.948] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [00:58:36.948] [bbotk]  0.05521701        8       0.04        0      0            0.049
INFO  [00:58:36.948] [bbotk]                                 uhash
INFO  [00:58:36.948] [bbotk]  6b8b0e9b-8c9b-4037-a4e9-beaaafaa198a
INFO  [00:58:36.987] [bbotk] Evaluating 1 configuration(s)
INFO  [00:58:37.029] [mlr3] Running benchmark with 1 resampling iterations
INFO  [00:58:37.070] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [00:58:37.142] [mlr3] Finished benchmark
INFO  [00:58:37.319] [bbotk] Result of batch 10:
INFO  [00:58:37.340] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [00:58:37.340] [bbotk]  0.09280291        3       0.04        0      0            0.062
INFO  [00:58:37.340] [bbotk]                                 uhash
INFO  [00:58:37.340] [bbotk]  8519b68c-3ae9-40c4-a199-401d51db111a
INFO  [00:58:37.455] [bbotk] Finished optimizing after 10 evaluation(s)
INFO  [00:58:37.457] [bbotk] Result:
INFO  [00:58:37.461] [bbotk]          cp minsplit learner_param_vals  x_domain classif.ce
INFO  [00:58:37.461] [bbotk]       <num>    <int>             <list>    <list>      <num>
INFO  [00:58:37.461] [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
Examples with CPU (user + system) or elapsed time > 5s
                                  user system elapsed
autoplot.OptimInstanceSingleCrit 5.601  0.186   9.987
autoplot.BenchmarkResult         5.427  0.175  10.299
autoplot.LearnerClassifRpart     2.950  0.092   6.443
autoplot.TaskClust               2.621  0.017   5.149