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:57:11.054] [bbotk] Starting to optimize 2 parameter(s) with '<OptimizerBatchRandomSearch>' and '<TerminatorEvals> [n_evals=10, k=0]'
INFO  [06:57:11.137] [bbotk] Evaluating 1 configuration(s)
INFO  [06:57:11.158] [mlr3] Running benchmark with 1 resampling iterations
INFO  [06:57:11.171] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [06:57:11.217] [mlr3] Finished benchmark
INFO  [06:57:11.301] [bbotk] Result of batch 1:
INFO  [06:57:11.307] [bbotk]           cp minsplit classif.ce warnings errors runtime_learners
INFO  [06:57:11.307] [bbotk]  0.008452299        3       0.06        0      0             0.03
INFO  [06:57:11.307] [bbotk]                                 uhash
INFO  [06:57:11.307] [bbotk]  afcee13c-3c68-43f4-b09e-a4e8cebfd0f7
INFO  [06:57:11.354] [bbotk] Evaluating 1 configuration(s)
INFO  [06:57:11.375] [mlr3] Running benchmark with 1 resampling iterations
INFO  [06:57:11.389] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [06:57:11.438] [mlr3] Finished benchmark
INFO  [06:57:11.529] [bbotk] Result of batch 2:
INFO  [06:57:11.535] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [06:57:11.535] [bbotk]  0.08961432        5       0.04        0      0             0.01
INFO  [06:57:11.535] [bbotk]                                 uhash
INFO  [06:57:11.535] [bbotk]  9e9a65f8-a097-4387-8597-ea2a97b3bc27
INFO  [06:57:11.561] [bbotk] Evaluating 1 configuration(s)
INFO  [06:57:11.581] [mlr3] Running benchmark with 1 resampling iterations
INFO  [06:57:11.594] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [06:57:11.631] [mlr3] Finished benchmark
INFO  [06:57:11.685] [bbotk] Result of batch 3:
INFO  [06:57:11.690] [bbotk]         cp minsplit classif.ce warnings errors runtime_learners
INFO  [06:57:11.690] [bbotk]  0.0418993        1       0.04        0      0             0.03
INFO  [06:57:11.690] [bbotk]                                 uhash
INFO  [06:57:11.690] [bbotk]  33621782-b4e0-49d2-bc11-cd9a8e93b4aa
INFO  [06:57:11.713] [bbotk] Evaluating 1 configuration(s)
INFO  [06:57:11.731] [mlr3] Running benchmark with 1 resampling iterations
INFO  [06:57:11.744] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [06:57:11.787] [mlr3] Finished benchmark
INFO  [06:57:11.869] [bbotk] Result of batch 4:
INFO  [06:57:11.876] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [06:57:11.876] [bbotk]  0.03442392        7       0.04        0      0             0.03
INFO  [06:57:11.876] [bbotk]                                 uhash
INFO  [06:57:11.876] [bbotk]  c35e5c7f-c658-48a2-b203-32af2a42202e
INFO  [06:57:11.903] [bbotk] Evaluating 1 configuration(s)
INFO  [06:57:11.924] [mlr3] Running benchmark with 1 resampling iterations
INFO  [06:57:11.937] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [06:57:11.982] [mlr3] Finished benchmark
INFO  [06:57:12.079] [bbotk] Result of batch 5:
INFO  [06:57:12.085] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [06:57:12.085] [bbotk]  0.03974457        4       0.04        0      0             0.03
INFO  [06:57:12.085] [bbotk]                                 uhash
INFO  [06:57:12.085] [bbotk]  df625472-9a89-4e7a-bb27-efdcab421b72
INFO  [06:57:12.111] [bbotk] Evaluating 1 configuration(s)
INFO  [06:57:12.131] [mlr3] Running benchmark with 1 resampling iterations
INFO  [06:57:12.143] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [06:57:12.187] [mlr3] Finished benchmark
INFO  [06:57:12.271] [bbotk] Result of batch 6:
INFO  [06:57:12.278] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [06:57:12.278] [bbotk]  0.07436679        7       0.04        0      0             0.01
INFO  [06:57:12.278] [bbotk]                                 uhash
INFO  [06:57:12.278] [bbotk]  f6251969-1de4-4b2c-b57a-654b95411772
INFO  [06:57:12.305] [bbotk] Evaluating 1 configuration(s)
INFO  [06:57:12.325] [mlr3] Running benchmark with 1 resampling iterations
INFO  [06:57:12.338] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [06:57:12.381] [mlr3] Finished benchmark
INFO  [06:57:12.464] [bbotk] Result of batch 7:
INFO  [06:57:12.471] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [06:57:12.471] [bbotk]  0.01993475        9       0.04        0      0             0.03
INFO  [06:57:12.471] [bbotk]                                 uhash
INFO  [06:57:12.471] [bbotk]  59fb4c2f-b269-4fa2-b8b2-327bcfd4532f
INFO  [06:57:12.497] [bbotk] Evaluating 1 configuration(s)
INFO  [06:57:12.517] [mlr3] Running benchmark with 1 resampling iterations
INFO  [06:57:12.529] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [06:57:12.573] [mlr3] Finished benchmark
INFO  [06:57:12.661] [bbotk] Result of batch 8:
INFO  [06:57:12.667] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [06:57:12.667] [bbotk]  0.01973017        8       0.04        0      0             0.03
INFO  [06:57:12.667] [bbotk]                                 uhash
INFO  [06:57:12.667] [bbotk]  442dca34-5527-48b5-bcaf-5c92a48a4486
INFO  [06:57:12.694] [bbotk] Evaluating 1 configuration(s)
INFO  [06:57:12.714] [mlr3] Running benchmark with 1 resampling iterations
INFO  [06:57:12.725] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [06:57:12.772] [mlr3] Finished benchmark
INFO  [06:57:12.861] [bbotk] Result of batch 9:
INFO  [06:57:12.868] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [06:57:12.868] [bbotk]  0.05521701        8       0.04        0      0             0.03
INFO  [06:57:12.868] [bbotk]                                 uhash
INFO  [06:57:12.868] [bbotk]  2640ab88-45ce-4539-a44b-b0571e4c2e61
INFO  [06:57:12.895] [bbotk] Evaluating 1 configuration(s)
INFO  [06:57:12.915] [mlr3] Running benchmark with 1 resampling iterations
INFO  [06:57:12.927] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [06:57:12.962] [mlr3] Finished benchmark
INFO  [06:57:13.057] [bbotk] Result of batch 10:
INFO  [06:57:13.063] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [06:57:13.063] [bbotk]  0.09280291        3       0.04        0      0             0.02
INFO  [06:57:13.063] [bbotk]                                 uhash
INFO  [06:57:13.063] [bbotk]  3f7132d3-1532-4246-818f-73cefeec21da
INFO  [06:57:13.133] [bbotk] Finished optimizing after 10 evaluation(s)
INFO  [06:57:13.134] [bbotk] Result:
INFO  [06:57:13.139] [bbotk]          cp minsplit learner_param_vals  x_domain classif.ce
INFO  [06:57:13.139] [bbotk]       <num>    <int>             <list>    <list>      <num>
INFO  [06:57:13.139] [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