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  [10:04:56.002] [bbotk] Starting to optimize 2 parameter(s) with '<OptimizerBatchRandomSearch>' and '<TerminatorEvals> [n_evals=10, k=0]'
INFO  [10:04:56.103] [bbotk] Evaluating 1 configuration(s)
INFO  [10:04:56.129] [mlr3] Running benchmark with 1 resampling iterations
INFO  [10:04:56.214] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [10:04:56.266] [mlr3] Finished benchmark
INFO  [10:04:56.362] [bbotk] Result of batch 1:
INFO  [10:04:56.374] [bbotk]           cp minsplit classif.ce warnings errors runtime_learners
INFO  [10:04:56.374] [bbotk]  0.008452299        3       0.06        0      0            0.033
INFO  [10:04:56.374] [bbotk]                                 uhash
INFO  [10:04:56.374] [bbotk]  64775c28-c47b-4766-8e4d-dd73aeb6af4e
INFO  [10:04:56.407] [bbotk] Evaluating 1 configuration(s)
INFO  [10:04:56.433] [mlr3] Running benchmark with 1 resampling iterations
INFO  [10:04:56.449] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [10:04:56.506] [mlr3] Finished benchmark
INFO  [10:04:56.607] [bbotk] Result of batch 2:
INFO  [10:04:56.616] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [10:04:56.616] [bbotk]  0.08961432        5       0.04        0      0            0.039
INFO  [10:04:56.616] [bbotk]                                 uhash
INFO  [10:04:56.616] [bbotk]  ca856bcf-7791-49fb-a6fe-fdef6a09245f
INFO  [10:04:56.649] [bbotk] Evaluating 1 configuration(s)
INFO  [10:04:56.677] [mlr3] Running benchmark with 1 resampling iterations
INFO  [10:04:56.693] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [10:04:56.748] [mlr3] Finished benchmark
INFO  [10:04:56.843] [bbotk] Result of batch 3:
INFO  [10:04:56.851] [bbotk]         cp minsplit classif.ce warnings errors runtime_learners
INFO  [10:04:56.851] [bbotk]  0.0418993        1       0.04        0      0            0.035
INFO  [10:04:56.851] [bbotk]                                 uhash
INFO  [10:04:56.851] [bbotk]  c5564361-b274-4850-91cd-eff1b69cd838
INFO  [10:04:56.884] [bbotk] Evaluating 1 configuration(s)
INFO  [10:04:56.907] [mlr3] Running benchmark with 1 resampling iterations
INFO  [10:04:56.923] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [10:04:56.977] [mlr3] Finished benchmark
INFO  [10:04:57.075] [bbotk] Result of batch 4:
INFO  [10:04:57.083] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [10:04:57.083] [bbotk]  0.03442392        7       0.04        0      0            0.035
INFO  [10:04:57.083] [bbotk]                                 uhash
INFO  [10:04:57.083] [bbotk]  904912ae-d4f2-49c8-b36c-62c58bd01fa6
INFO  [10:04:57.116] [bbotk] Evaluating 1 configuration(s)
INFO  [10:04:57.142] [mlr3] Running benchmark with 1 resampling iterations
INFO  [10:04:57.176] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [10:04:57.342] [mlr3] Finished benchmark
INFO  [10:04:57.492] [bbotk] Result of batch 5:
INFO  [10:04:58.109] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [10:04:58.109] [bbotk]  0.03974457        4       0.04        0      0            0.118
INFO  [10:04:58.109] [bbotk]                                 uhash
INFO  [10:04:58.109] [bbotk]  96fc4f3e-4133-4bcd-95fc-1aea2f757016
INFO  [10:04:58.245] [bbotk] Evaluating 1 configuration(s)
INFO  [10:04:58.305] [mlr3] Running benchmark with 1 resampling iterations
INFO  [10:04:58.338] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [10:04:58.405] [mlr3] Finished benchmark
INFO  [10:04:58.536] [bbotk] Result of batch 6:
INFO  [10:04:58.546] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [10:04:58.546] [bbotk]  0.07436679        7       0.04        0      0            0.042
INFO  [10:04:58.546] [bbotk]                                 uhash
INFO  [10:04:58.546] [bbotk]  9297a84e-366b-4943-a0ba-011a61d23118
INFO  [10:04:58.579] [bbotk] Evaluating 1 configuration(s)
INFO  [10:04:58.701] [mlr3] Running benchmark with 1 resampling iterations
INFO  [10:04:58.828] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [10:04:59.042] [mlr3] Finished benchmark
INFO  [10:04:59.421] [bbotk] Result of batch 7:
INFO  [10:04:59.461] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [10:04:59.461] [bbotk]  0.01993475        9       0.04        0      0            0.153
INFO  [10:04:59.461] [bbotk]                                 uhash
INFO  [10:04:59.461] [bbotk]  db6b0b69-e04f-4ddf-93e5-ba55d3b230a0
INFO  [10:04:59.574] [bbotk] Evaluating 1 configuration(s)
INFO  [10:04:59.655] [mlr3] Running benchmark with 1 resampling iterations
INFO  [10:04:59.741] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [10:05:00.106] [mlr3] Finished benchmark
INFO  [10:05:00.680] [bbotk] Result of batch 8:
INFO  [10:05:00.689] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [10:05:00.689] [bbotk]  0.01973017        8       0.04        0      0            0.266
INFO  [10:05:00.689] [bbotk]                                 uhash
INFO  [10:05:00.689] [bbotk]  2d539514-f744-4869-a9c3-9157b603f55d
INFO  [10:05:00.723] [bbotk] Evaluating 1 configuration(s)
INFO  [10:05:00.748] [mlr3] Running benchmark with 1 resampling iterations
INFO  [10:05:00.767] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [10:05:00.830] [mlr3] Finished benchmark
INFO  [10:05:00.941] [bbotk] Result of batch 9:
INFO  [10:05:00.952] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [10:05:00.952] [bbotk]  0.05521701        8       0.04        0      0            0.042
INFO  [10:05:00.952] [bbotk]                                 uhash
INFO  [10:05:00.952] [bbotk]  d8b656c8-fa2b-43d5-88c6-66c04f0c1433
INFO  [10:05:00.989] [bbotk] Evaluating 1 configuration(s)
INFO  [10:05:01.016] [mlr3] Running benchmark with 1 resampling iterations
INFO  [10:05:01.034] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [10:05:01.106] [mlr3] Finished benchmark
INFO  [10:05:01.450] [bbotk] Result of batch 10:
INFO  [10:05:01.480] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [10:05:01.480] [bbotk]  0.09280291        3       0.04        0      0            0.047
INFO  [10:05:01.480] [bbotk]                                 uhash
INFO  [10:05:01.480] [bbotk]  5493921e-66ed-4aaa-a411-5dd094d51a09
INFO  [10:05:01.560] [bbotk] Finished optimizing after 10 evaluation(s)
INFO  [10:05:01.562] [bbotk] Result:
INFO  [10:05:01.571] [bbotk]          cp minsplit learner_param_vals  x_domain classif.ce
INFO  [10:05:01.571] [bbotk]       <num>    <int>             <list>    <list>      <num>
INFO  [10:05:01.571] [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