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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: plotD3.aggregated_profiles_explainer
> ### Title: Plots Aggregated Ceteris Paribus Profiles in D3 with r2d3
> ###   Package.
> ### Aliases: plotD3.aggregated_profiles_explainer
> 
> ### ** Examples
> 
> library("DALEX")
Welcome to DALEX (version: 1.0).
Find examples and detailed introduction at: https://pbiecek.github.io/ema/


Attaching package: 'DALEX'

The following object is masked from 'package:ingredients':

    feature_importance

> library("randomForest")
randomForest 4.6-14
Type rfNews() to see new features/changes/bug fixes.
> 
> # smaller data, quicker example
> titanic_small <- select_sample(titanic_imputed, n = 500, seed = 1313)
> 
> # build a model
> model_titanic_rf <- randomForest(survived ~.,  data = titanic_small)
Warning in randomForest.default(m, y, ...) :
  The response has five or fewer unique values.  Are you sure you want to do regression?
> 
> explain_titanic_rf <- explain(model_titanic_rf,
+                               data = titanic_small[,-8],
+                               y = titanic_small[,8],
+                               label = "Random Forest v7")
Preparation of a new explainer is initiated
  -> model label       :  Random Forest v7 
  -> data              :  500  rows  7  cols 
  -> target variable   :  500  values 
  -> model_info        :  package randomForest , ver. 4.6.14 , task regression ( [33m default [39m ) 
  -> predict function  :  yhat.randomForest  will be used ( [33m default [39m )
  -> predicted values  :  numerical, min =  0.02519995 , mean =  0.3007432 , max =  0.9799076  
  -> residual function :  difference between y and yhat ( [33m default [39m )
  -> residuals         :  numerical, min =  -0.7228011 , mean =  0.001256827 , max =  0.8084979  
 [32m A new explainer has been created! [39m 
> 
> selected_passangers <- select_sample(titanic_small, n = 100)
> cp_rf <- ceteris_paribus(explain_titanic_rf, selected_passangers)
> 
> pdp_rf_p <- aggregate_profiles(cp_rf, type = "partial", variable_type = "numerical")
> pdp_rf_p$`_label_` <- "RF_partial"
> pdp_rf_c <- aggregate_profiles(cp_rf, type = "conditional", variable_type = "numerical")
> pdp_rf_c$`_label_` <- "RF_conditional"
> pdp_rf_a <- aggregate_profiles(cp_rf, type = "accumulated", variable_type = "numerical")
> pdp_rf_a$`_label_` <- "RF_accumulated"
> 
> plotD3(pdp_rf_p, pdp_rf_c, pdp_rf_a, scale_plot = TRUE)
Error in UseMethod("droplevels") : 
  no applicable method for 'droplevels' applied to an object of class "character"
Calls: plotD3 -> plotD3.aggregated_profiles_explainer -> droplevels
Execution halted