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

> ### 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  [06:21:30.927] [bbotk] Starting to optimize 2 parameter(s) with '<OptimizerBatchRandomSearch>' and '<TerminatorEvals> [n_evals=10, k=0]'
INFO  [06:21:31.009] [bbotk] Evaluating 1 configuration(s)
INFO  [06:21:31.030] [mlr3] Running benchmark with 1 resampling iterations
INFO  [06:21:31.042] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [06:21:31.087] [mlr3] Finished benchmark
INFO  [06:21:31.170] [bbotk] Result of batch 1:
INFO  [06:21:31.176] [bbotk]           cp minsplit classif.ce warnings errors runtime_learners
INFO  [06:21:31.176] [bbotk]  0.008452299        3       0.06        0      0             0.03
INFO  [06:21:31.176] [bbotk]                                 uhash
INFO  [06:21:31.176] [bbotk]  53086df9-fd02-48b8-a7e4-190f85427c0c
INFO  [06:21:31.222] [bbotk] Evaluating 1 configuration(s)
INFO  [06:21:31.241] [mlr3] Running benchmark with 1 resampling iterations
INFO  [06:21:31.254] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [06:21:31.297] [mlr3] Finished benchmark
INFO  [06:21:31.381] [bbotk] Result of batch 2:
INFO  [06:21:31.387] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [06:21:31.387] [bbotk]  0.08961432        5       0.04        0      0             0.03
INFO  [06:21:31.387] [bbotk]                                 uhash
INFO  [06:21:31.387] [bbotk]  f25baacd-4b37-49c9-878b-da3d5bbd7c61
INFO  [06:21:31.413] [bbotk] Evaluating 1 configuration(s)
INFO  [06:21:31.432] [mlr3] Running benchmark with 1 resampling iterations
INFO  [06:21:31.445] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [06:21:31.488] [mlr3] Finished benchmark
INFO  [06:21:31.570] [bbotk] Result of batch 3:
INFO  [06:21:31.576] [bbotk]         cp minsplit classif.ce warnings errors runtime_learners
INFO  [06:21:31.576] [bbotk]  0.0418993        1       0.04        0      0             0.03
INFO  [06:21:31.576] [bbotk]                                 uhash
INFO  [06:21:31.576] [bbotk]  481fb8fd-5983-48d4-a885-8e12a665d65e
INFO  [06:21:31.602] [bbotk] Evaluating 1 configuration(s)
INFO  [06:21:31.626] [mlr3] Running benchmark with 1 resampling iterations
INFO  [06:21:31.642] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [06:21:31.696] [mlr3] Finished benchmark
INFO  [06:21:31.782] [bbotk] Result of batch 4:
INFO  [06:21:31.788] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [06:21:31.788] [bbotk]  0.03442392        7       0.04        0      0             0.03
INFO  [06:21:31.788] [bbotk]                                 uhash
INFO  [06:21:31.788] [bbotk]  0ba7d9ef-609a-46a6-9f61-ed7f4cb2cfd8
INFO  [06:21:31.820] [bbotk] Evaluating 1 configuration(s)
INFO  [06:21:31.845] [mlr3] Running benchmark with 1 resampling iterations
INFO  [06:21:31.862] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [06:21:31.909] [mlr3] Finished benchmark
INFO  [06:21:32.009] [bbotk] Result of batch 5:
INFO  [06:21:32.016] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [06:21:32.016] [bbotk]  0.03974457        4       0.04        0      0             0.03
INFO  [06:21:32.016] [bbotk]                                 uhash
INFO  [06:21:32.016] [bbotk]  25e7076f-b9d6-4310-bd9f-7cc5360a0c23
INFO  [06:21:32.041] [bbotk] Evaluating 1 configuration(s)
INFO  [06:21:32.061] [mlr3] Running benchmark with 1 resampling iterations
INFO  [06:21:32.072] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [06:21:32.113] [mlr3] Finished benchmark
INFO  [06:21:32.182] [bbotk] Result of batch 6:
INFO  [06:21:32.188] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [06:21:32.188] [bbotk]  0.07436679        7       0.04        0      0             0.03
INFO  [06:21:32.188] [bbotk]                                 uhash
INFO  [06:21:32.188] [bbotk]  e59dc9b7-ecb6-4ea1-97f1-0efbdd3a6986
INFO  [06:21:32.214] [bbotk] Evaluating 1 configuration(s)
INFO  [06:21:32.233] [mlr3] Running benchmark with 1 resampling iterations
INFO  [06:21:32.246] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [06:21:32.286] [mlr3] Finished benchmark
INFO  [06:21:32.373] [bbotk] Result of batch 7:
INFO  [06:21:32.379] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [06:21:32.379] [bbotk]  0.01993475        9       0.04        0      0             0.04
INFO  [06:21:32.379] [bbotk]                                 uhash
INFO  [06:21:32.379] [bbotk]  9d3ccce7-fd0f-4c23-9678-68526dca4a40
INFO  [06:21:32.408] [bbotk] Evaluating 1 configuration(s)
INFO  [06:21:32.433] [mlr3] Running benchmark with 1 resampling iterations
INFO  [06:21:32.449] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [06:21:32.505] [mlr3] Finished benchmark
INFO  [06:21:32.610] [bbotk] Result of batch 8:
INFO  [06:21:32.618] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [06:21:32.618] [bbotk]  0.01973017        8       0.04        0      0             0.04
INFO  [06:21:32.618] [bbotk]                                 uhash
INFO  [06:21:32.618] [bbotk]  b1a56a81-5360-4d7a-9411-e13d0ed08427
INFO  [06:21:32.649] [bbotk] Evaluating 1 configuration(s)
INFO  [06:21:32.673] [mlr3] Running benchmark with 1 resampling iterations
INFO  [06:21:32.688] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [06:21:32.733] [mlr3] Finished benchmark
INFO  [06:21:32.826] [bbotk] Result of batch 9:
INFO  [06:21:32.833] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [06:21:32.833] [bbotk]  0.05521701        8       0.04        0      0             0.02
INFO  [06:21:32.833] [bbotk]                                 uhash
INFO  [06:21:32.833] [bbotk]  8b614a00-d1eb-4190-ba6b-22705db0688d
INFO  [06:21:32.866] [bbotk] Evaluating 1 configuration(s)
INFO  [06:21:32.889] [mlr3] Running benchmark with 1 resampling iterations
INFO  [06:21:32.904] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [06:21:32.954] [mlr3] Finished benchmark
INFO  [06:21:33.056] [bbotk] Result of batch 10:
INFO  [06:21:33.063] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [06:21:33.063] [bbotk]  0.09280291        3       0.04        0      0             0.04
INFO  [06:21:33.063] [bbotk]                                 uhash
INFO  [06:21:33.063] [bbotk]  a0a17bad-968e-4ef9-b74a-fe0022c36bae
INFO  [06:21:33.137] [bbotk] Finished optimizing after 10 evaluation(s)
INFO  [06:21:33.139] [bbotk] Result:
INFO  [06:21:33.144] [bbotk]          cp minsplit learner_param_vals  x_domain classif.ce
INFO  [06:21:33.144] [bbotk]       <num>    <int>             <list>    <list>      <num>
INFO  [06:21:33.144] [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