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:59:02.658] [bbotk] Starting to optimize 2 parameter(s) with '<OptimizerBatchRandomSearch>' and '<TerminatorEvals> [n_evals=10, k=0]'
INFO  [00:59:02.719] [bbotk] Evaluating 1 configuration(s)
INFO  [00:59:02.735] [mlr3] Running benchmark with 1 resampling iterations
INFO  [00:59:02.744] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [00:59:02.776] [mlr3] Finished benchmark
INFO  [00:59:02.901] [bbotk] Result of batch 1:
INFO  [00:59:02.919] [bbotk]           cp minsplit classif.ce warnings errors runtime_learners
INFO  [00:59:02.919] [bbotk]  0.008452299        3       0.06        0      0            0.022
INFO  [00:59:02.919] [bbotk]                                 uhash
INFO  [00:59:02.919] [bbotk]  6a3ba902-adcc-4385-a3fd-3410323401df
INFO  [00:59:02.991] [bbotk] Evaluating 1 configuration(s)
INFO  [00:59:03.045] [mlr3] Running benchmark with 1 resampling iterations
INFO  [00:59:03.055] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [00:59:03.119] [mlr3] Finished benchmark
INFO  [00:59:03.224] [bbotk] Result of batch 2:
INFO  [00:59:03.245] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [00:59:03.245] [bbotk]  0.08961432        5       0.04        0      0            0.037
INFO  [00:59:03.245] [bbotk]                                 uhash
INFO  [00:59:03.245] [bbotk]  de5dcae6-4ef6-4754-b2aa-6d0cc1cffae5
INFO  [00:59:03.280] [bbotk] Evaluating 1 configuration(s)
INFO  [00:59:03.310] [mlr3] Running benchmark with 1 resampling iterations
INFO  [00:59:03.320] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [00:59:03.385] [mlr3] Finished benchmark
INFO  [00:59:03.505] [bbotk] Result of batch 3:
INFO  [00:59:03.510] [bbotk]         cp minsplit classif.ce warnings errors runtime_learners
INFO  [00:59:03.510] [bbotk]  0.0418993        1       0.04        0      0            0.037
INFO  [00:59:03.510] [bbotk]                                 uhash
INFO  [00:59:03.510] [bbotk]  8c282766-f621-4294-be4e-ee4a25988b65
INFO  [00:59:03.577] [bbotk] Evaluating 1 configuration(s)
INFO  [00:59:03.607] [mlr3] Running benchmark with 1 resampling iterations
INFO  [00:59:03.632] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [00:59:03.694] [mlr3] Finished benchmark
INFO  [00:59:03.796] [bbotk] Result of batch 4:
INFO  [00:59:03.800] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [00:59:03.800] [bbotk]  0.03442392        7       0.04        0      0            0.035
INFO  [00:59:03.800] [bbotk]                                 uhash
INFO  [00:59:03.800] [bbotk]  fbc0e1f6-470b-4716-ac0f-446b224101b8
INFO  [00:59:03.835] [bbotk] Evaluating 1 configuration(s)
INFO  [00:59:03.865] [mlr3] Running benchmark with 1 resampling iterations
INFO  [00:59:03.890] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [00:59:03.972] [mlr3] Finished benchmark
INFO  [00:59:04.075] [bbotk] Result of batch 5:
INFO  [00:59:04.080] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [00:59:04.080] [bbotk]  0.03974457        4       0.04        0      0            0.055
INFO  [00:59:04.080] [bbotk]                                 uhash
INFO  [00:59:04.080] [bbotk]  3bb97d3f-8495-4662-8715-c49b9dce471d
INFO  [00:59:04.114] [bbotk] Evaluating 1 configuration(s)
INFO  [00:59:04.144] [mlr3] Running benchmark with 1 resampling iterations
INFO  [00:59:04.169] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [00:59:04.231] [mlr3] Finished benchmark
INFO  [00:59:04.335] [bbotk] Result of batch 6:
INFO  [00:59:04.340] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [00:59:04.340] [bbotk]  0.07436679        7       0.04        0      0            0.037
INFO  [00:59:04.340] [bbotk]                                 uhash
INFO  [00:59:04.340] [bbotk]  81bf04a0-5a6f-456e-a3e8-535af97d5efe
INFO  [00:59:04.359] [bbotk] Evaluating 1 configuration(s)
INFO  [00:59:04.373] [mlr3] Running benchmark with 1 resampling iterations
INFO  [00:59:04.382] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [00:59:04.430] [mlr3] Finished benchmark
INFO  [00:59:04.703] [bbotk] Result of batch 7:
INFO  [00:59:04.717] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [00:59:04.717] [bbotk]  0.01993475        9       0.04        0      0            0.037
INFO  [00:59:04.717] [bbotk]                                 uhash
INFO  [00:59:04.717] [bbotk]  cd143458-afb9-49c9-8afd-a5b1b7f2a3c6
INFO  [00:59:04.770] [bbotk] Evaluating 1 configuration(s)
INFO  [00:59:04.807] [mlr3] Running benchmark with 1 resampling iterations
INFO  [00:59:04.837] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [00:59:04.895] [mlr3] Finished benchmark
INFO  [00:59:04.952] [bbotk] Result of batch 8:
INFO  [00:59:04.957] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [00:59:04.957] [bbotk]  0.01973017        8       0.04        0      0            0.047
INFO  [00:59:04.957] [bbotk]                                 uhash
INFO  [00:59:04.957] [bbotk]  30033346-f2b7-49a7-b188-4fbca6eca1a9
INFO  [00:59:04.976] [bbotk] Evaluating 1 configuration(s)
INFO  [00:59:04.990] [mlr3] Running benchmark with 1 resampling iterations
INFO  [00:59:04.999] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [00:59:05.030] [mlr3] Finished benchmark
INFO  [00:59:05.086] [bbotk] Result of batch 9:
INFO  [00:59:05.090] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [00:59:05.090] [bbotk]  0.05521701        8       0.04        0      0             0.02
INFO  [00:59:05.090] [bbotk]                                 uhash
INFO  [00:59:05.090] [bbotk]  1ff38cfb-69ef-46a4-95c5-903fe7b405db
INFO  [00:59:05.109] [bbotk] Evaluating 1 configuration(s)
INFO  [00:59:05.124] [mlr3] Running benchmark with 1 resampling iterations
INFO  [00:59:05.133] [mlr3] Applying learner 'classif.rpart' on task 'iris' (iter 1/1)
INFO  [00:59:05.175] [mlr3] Finished benchmark
INFO  [00:59:05.232] [bbotk] Result of batch 10:
INFO  [00:59:05.237] [bbotk]          cp minsplit classif.ce warnings errors runtime_learners
INFO  [00:59:05.237] [bbotk]  0.09280291        3       0.04        0      0            0.023
INFO  [00:59:05.237] [bbotk]                                 uhash
INFO  [00:59:05.237] [bbotk]  55793dee-f9b6-49f4-98d3-77fc9b5f3a01
INFO  [00:59:05.280] [bbotk] Finished optimizing after 10 evaluation(s)
INFO  [00:59:05.282] [bbotk] Result:
INFO  [00:59:05.286] [bbotk]          cp minsplit learner_param_vals  x_domain classif.ce
INFO  [00:59:05.286] [bbotk]       <num>    <int>             <list>    <list>      <num>
INFO  [00:59:05.286] [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.602  0.142   9.820
autoplot.BenchmarkResult         5.371  0.167  10.529