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  [07:00:47.229] [bbotk] Starting to optimize 2 parameter(s) with '<OptimizerBatchRandomSearch>' and '<TerminatorEvals> [n_evals=10, k=0]'
INFO  [07:00:47.305] [bbotk] Evaluating 1 configuration(s)
INFO  [07:00:47.325] [mlr3] Running benchmark with 1 resampling iterations
INFO  [07:00:47.338] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [07:00:47.381] [mlr3] Finished benchmark
INFO  [07:00:47.477] [bbotk] Result of batch 1:
INFO  [07:00:47.484] [bbotk]           cp minsplit classif.ce warnings errors runtime_learners
INFO  [07:00:47.484] [bbotk]  0.008452299        3       0.06        0      0            0.028
INFO  [07:00:47.484] [bbotk]                                 uhash
INFO  [07:00:47.484] [bbotk]  c5f028f9-7b49-4f15-86d7-fb8666d81e1f
INFO  [07:00:47.509] [bbotk] Evaluating 1 configuration(s)
INFO  [07:00:47.528] [mlr3] Running benchmark with 1 resampling iterations
INFO  [07:00:47.540] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [07:00:47.581] [mlr3] Finished benchmark
INFO  [07:00:47.659] [bbotk] Result of batch 2:
INFO  [07:00:47.666] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [07:00:47.666] [bbotk]  0.08961432        5       0.04        0      0            0.026
INFO  [07:00:47.666] [bbotk]                                 uhash
INFO  [07:00:47.666] [bbotk]  3b6689c5-790c-4ad7-b91f-68f3bdd352d0
INFO  [07:00:47.703] [bbotk] Evaluating 1 configuration(s)
INFO  [07:00:47.726] [mlr3] Running benchmark with 1 resampling iterations
INFO  [07:00:47.740] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [07:00:47.790] [mlr3] Finished benchmark
INFO  [07:00:47.881] [bbotk] Result of batch 3:
INFO  [07:00:47.889] [bbotk]         cp minsplit classif.ce warnings errors runtime_learners
INFO  [07:00:47.889] [bbotk]  0.0418993        1       0.04        0      0            0.033
INFO  [07:00:47.889] [bbotk]                                 uhash
INFO  [07:00:47.889] [bbotk]  b94a04db-c6d3-48ff-83fd-73c6903086d4
INFO  [07:00:47.952] [bbotk] Evaluating 1 configuration(s)
INFO  [07:00:47.974] [mlr3] Running benchmark with 1 resampling iterations
INFO  [07:00:47.987] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [07:00:48.035] [mlr3] Finished benchmark
INFO  [07:00:48.129] [bbotk] Result of batch 4:
INFO  [07:00:48.139] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [07:00:48.139] [bbotk]  0.03442392        7       0.04        0      0             0.03
INFO  [07:00:48.139] [bbotk]                                 uhash
INFO  [07:00:48.139] [bbotk]  c3a19244-6bbe-4c5e-8ae5-e67a2aed5a98
INFO  [07:00:48.169] [bbotk] Evaluating 1 configuration(s)
INFO  [07:00:48.192] [mlr3] Running benchmark with 1 resampling iterations
INFO  [07:00:48.208] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [07:00:48.260] [mlr3] Finished benchmark
INFO  [07:00:48.344] [bbotk] Result of batch 5:
INFO  [07:00:48.352] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [07:00:48.352] [bbotk]  0.03974457        4       0.04        0      0            0.034
INFO  [07:00:48.352] [bbotk]                                 uhash
INFO  [07:00:48.352] [bbotk]  43714582-d65c-4935-a8c2-5199e498caf9
INFO  [07:00:48.381] [bbotk] Evaluating 1 configuration(s)
INFO  [07:00:48.403] [mlr3] Running benchmark with 1 resampling iterations
INFO  [07:00:48.418] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [07:00:48.480] [mlr3] Finished benchmark
INFO  [07:00:48.584] [bbotk] Result of batch 6:
INFO  [07:00:48.595] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [07:00:48.595] [bbotk]  0.07436679        7       0.04        0      0            0.042
INFO  [07:00:48.595] [bbotk]                                 uhash
INFO  [07:00:48.595] [bbotk]  f45e7b82-10c2-4561-aa12-62bcd3cfe8d9
INFO  [07:00:48.651] [bbotk] Evaluating 1 configuration(s)
INFO  [07:00:48.696] [mlr3] Running benchmark with 1 resampling iterations
INFO  [07:00:48.709] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [07:00:48.769] [mlr3] Finished benchmark
INFO  [07:00:48.963] [bbotk] Result of batch 7:
INFO  [07:00:48.971] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [07:00:48.971] [bbotk]  0.01993475        9       0.04        0      0             0.04
INFO  [07:00:48.971] [bbotk]                                 uhash
INFO  [07:00:48.971] [bbotk]  70da65a1-40f0-45c6-ba6e-01ae33963d20
INFO  [07:00:49.022] [bbotk] Evaluating 1 configuration(s)
INFO  [07:00:49.047] [mlr3] Running benchmark with 1 resampling iterations
INFO  [07:00:49.063] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [07:00:49.140] [mlr3] Finished benchmark
INFO  [07:00:49.217] [bbotk] Result of batch 8:
INFO  [07:00:49.224] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [07:00:49.224] [bbotk]  0.01973017        8       0.04        0      0            0.049
INFO  [07:00:49.224] [bbotk]                                 uhash
INFO  [07:00:49.224] [bbotk]  fbdd3f7b-0cf6-4c5f-85a3-67d607dfd8b7
INFO  [07:00:49.253] [bbotk] Evaluating 1 configuration(s)
INFO  [07:00:49.272] [mlr3] Running benchmark with 1 resampling iterations
INFO  [07:00:49.284] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [07:00:49.326] [mlr3] Finished benchmark
INFO  [07:00:49.411] [bbotk] Result of batch 9:
INFO  [07:00:49.418] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [07:00:49.418] [bbotk]  0.05521701        8       0.04        0      0            0.026
INFO  [07:00:49.418] [bbotk]                                 uhash
INFO  [07:00:49.418] [bbotk]  a92fac4d-2d32-4a5c-a955-1e8c4b3528db
INFO  [07:00:49.443] [bbotk] Evaluating 1 configuration(s)
INFO  [07:00:49.461] [mlr3] Running benchmark with 1 resampling iterations
INFO  [07:00:49.489] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [07:00:49.531] [mlr3] Finished benchmark
INFO  [07:00:49.658] [bbotk] Result of batch 10:
INFO  [07:00:49.665] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [07:00:49.665] [bbotk]  0.09280291        3       0.04        0      0            0.026
INFO  [07:00:49.665] [bbotk]                                 uhash
INFO  [07:00:49.665] [bbotk]  7452f15b-6393-4395-a309-7c93e9634e18
INFO  [07:00:49.725] [bbotk] Finished optimizing after 10 evaluation(s)
INFO  [07:00:49.727] [bbotk] Result:
INFO  [07:00:49.733] [bbotk]          cp minsplit learner_param_vals  x_domain classif.ce
INFO  [07:00:49.733] [bbotk]       <num>    <int>             <list>    <list>      <num>
INFO  [07:00:49.733] [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 7.889  0.209   8.628
autoplot.BenchmarkResult         7.328  0.209   8.503