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:18.175] [bbotk] Starting to optimize 2 parameter(s) with '<OptimizerBatchRandomSearch>' and '<TerminatorEvals> [n_evals=10, k=0]'
INFO  [00:58:18.256] [bbotk] Evaluating 1 configuration(s)
INFO  [00:58:18.270] [mlr3] Running benchmark with 1 resampling iterations
INFO  [00:58:18.281] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [00:58:18.314] [mlr3] Finished benchmark
INFO  [00:58:18.370] [bbotk] Result of batch 1:
INFO  [00:58:18.375] [bbotk]           cp minsplit classif.ce warnings errors runtime_learners
INFO  [00:58:18.375] [bbotk]  0.008452299        3       0.06        0      0            0.021
INFO  [00:58:18.375] [bbotk]                                 uhash
INFO  [00:58:18.375] [bbotk]  0a9041d9-9542-4a90-a268-b34382e71793
INFO  [00:58:18.393] [bbotk] Evaluating 1 configuration(s)
INFO  [00:58:18.406] [mlr3] Running benchmark with 1 resampling iterations
INFO  [00:58:18.415] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [00:58:18.445] [mlr3] Finished benchmark
INFO  [00:58:18.502] [bbotk] Result of batch 2:
INFO  [00:58:18.507] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [00:58:18.507] [bbotk]  0.08961432        5       0.04        0      0            0.019
INFO  [00:58:18.507] [bbotk]                                 uhash
INFO  [00:58:18.507] [bbotk]  dde38ee1-65f3-4700-94e0-25d60657cca8
INFO  [00:58:18.526] [bbotk] Evaluating 1 configuration(s)
INFO  [00:58:18.541] [mlr3] Running benchmark with 1 resampling iterations
INFO  [00:58:18.567] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [00:58:18.630] [mlr3] Finished benchmark
INFO  [00:58:18.765] [bbotk] Result of batch 3:
INFO  [00:58:18.770] [bbotk]         cp minsplit classif.ce warnings errors runtime_learners
INFO  [00:58:18.770] [bbotk]  0.0418993        1       0.04        0      0             0.02
INFO  [00:58:18.770] [bbotk]                                 uhash
INFO  [00:58:18.770] [bbotk]  8f1dd10f-262a-4ba7-9492-d4143ab7b9e6
INFO  [00:58:18.830] [bbotk] Evaluating 1 configuration(s)
INFO  [00:58:18.860] [mlr3] Running benchmark with 1 resampling iterations
INFO  [00:58:18.870] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [00:58:19.054] [mlr3] Finished benchmark
INFO  [00:58:19.177] [bbotk] Result of batch 4:
INFO  [00:58:19.183] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [00:58:19.183] [bbotk]  0.03442392        7       0.04        0      0             0.13
INFO  [00:58:19.183] [bbotk]                                 uhash
INFO  [00:58:19.183] [bbotk]  4e50393b-d888-45a2-91ba-0ced9c0565ff
INFO  [00:58:19.224] [bbotk] Evaluating 1 configuration(s)
INFO  [00:58:19.247] [mlr3] Running benchmark with 1 resampling iterations
INFO  [00:58:19.269] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [00:58:19.348] [mlr3] Finished benchmark
INFO  [00:58:19.462] [bbotk] Result of batch 5:
INFO  [00:58:19.488] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [00:58:19.488] [bbotk]  0.03974457        4       0.04        0      0            0.069
INFO  [00:58:19.488] [bbotk]                                 uhash
INFO  [00:58:19.488] [bbotk]  f74d0c2d-68dd-4a5e-8251-a47b9a93c82c
INFO  [00:58:19.563] [bbotk] Evaluating 1 configuration(s)
INFO  [00:58:19.578] [mlr3] Running benchmark with 1 resampling iterations
INFO  [00:58:19.603] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [00:58:19.691] [mlr3] Finished benchmark
INFO  [00:58:19.832] [bbotk] Result of batch 6:
INFO  [00:58:19.838] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [00:58:19.838] [bbotk]  0.07436679        7       0.04        0      0            0.053
INFO  [00:58:19.838] [bbotk]                                 uhash
INFO  [00:58:19.838] [bbotk]  56006934-f144-4951-b1ee-ba3aea28adde
INFO  [00:58:19.893] [bbotk] Evaluating 1 configuration(s)
INFO  [00:58:19.915] [mlr3] Running benchmark with 1 resampling iterations
INFO  [00:58:19.953] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [00:58:20.009] [mlr3] Finished benchmark
INFO  [00:58:20.119] [bbotk] Result of batch 7:
INFO  [00:58:20.124] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [00:58:20.124] [bbotk]  0.01993475        9       0.04        0      0            0.046
INFO  [00:58:20.124] [bbotk]                                 uhash
INFO  [00:58:20.124] [bbotk]  974642f6-bcce-422a-ada1-f5d9e8f72fc7
INFO  [00:58:20.169] [bbotk] Evaluating 1 configuration(s)
INFO  [00:58:20.216] [mlr3] Running benchmark with 1 resampling iterations
INFO  [00:58:20.225] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [00:58:20.297] [mlr3] Finished benchmark
INFO  [00:58:20.460] [bbotk] Result of batch 8:
INFO  [00:58:20.466] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [00:58:20.466] [bbotk]  0.01973017        8       0.04        0      0            0.059
INFO  [00:58:20.466] [bbotk]                                 uhash
INFO  [00:58:20.466] [bbotk]  61f94f31-8aa0-4c66-9003-1ff29d76b1cb
INFO  [00:58:20.513] [bbotk] Evaluating 1 configuration(s)
INFO  [00:58:20.537] [mlr3] Running benchmark with 1 resampling iterations
INFO  [00:58:20.546] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [00:58:20.631] [mlr3] Finished benchmark
INFO  [00:58:20.748] [bbotk] Result of batch 9:
INFO  [00:58:20.753] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [00:58:20.753] [bbotk]  0.05521701        8       0.04        0      0            0.058
INFO  [00:58:20.753] [bbotk]                                 uhash
INFO  [00:58:20.753] [bbotk]  db64a749-0282-44fb-b012-7c7b03de0143
INFO  [00:58:20.806] [bbotk] Evaluating 1 configuration(s)
INFO  [00:58:20.861] [mlr3] Running benchmark with 1 resampling iterations
INFO  [00:58:20.870] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [00:58:20.903] [mlr3] Finished benchmark
INFO  [00:58:20.959] [bbotk] Result of batch 10:
INFO  [00:58:20.965] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [00:58:20.965] [bbotk]  0.09280291        3       0.04        0      0            0.021
INFO  [00:58:20.965] [bbotk]                                 uhash
INFO  [00:58:20.965] [bbotk]  0eff896e-81ce-4ca3-9a4d-c1c4e9c70905
INFO  [00:58:21.017] [bbotk] Finished optimizing after 10 evaluation(s)
INFO  [00:58:21.018] [bbotk] Result:
INFO  [00:58:21.022] [bbotk]          cp minsplit learner_param_vals  x_domain classif.ce
INFO  [00:58:21.022] [bbotk]       <num>    <int>             <list>    <list>      <num>
INFO  [00:58:21.022] [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.755  0.150  11.642
autoplot.BenchmarkResult         5.233  0.180  10.577
autoplot.LearnerClassifRpart     2.935  0.108   5.721
autoplot.TaskClust               2.719  0.014   5.370