Running examples in ‘modelplotr-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: customize_plot_text
> ### Title: Customize textual elements of the plots
> ### Aliases: customize_plot_text
> 
> ### ** Examples
> 
> # load example data (Bank clients with/without a term deposit - see ?bank_td for details)
> data("bank_td")
> 
> # prepare data for training model for binomial target has_td and train models
> train_index =  sample(seq(1, nrow(bank_td)),size = 0.5*nrow(bank_td) ,replace = FALSE)
> train = bank_td[train_index,c('has_td','duration','campaign','pdays','previous','euribor3m')]
> test = bank_td[-train_index,c('has_td','duration','campaign','pdays','previous','euribor3m')]
> 
> #train models using caret... (or use mlr or H2o or keras ... see ?prepare_scores_and_ntiles)
> # setting caret cross validation, here tuned for speed (not accuracy!)
> fitControl <- caret::trainControl(method = "cv",number = 2,classProbs=TRUE)
> # random forest using ranger package, here tuned for speed (not accuracy!)
> rf = caret::train(has_td ~.,data = train, method = "ranger",trControl = fitControl,
+                   tuneGrid = expand.grid(.mtry = 2,.splitrule = "gini",.min.node.size=10))
Loading required package: ggplot2
Loading required package: lattice
> # mnl model using glmnet package
> mnl = caret::train(has_td ~.,data = train, method = "glmnet",trControl = fitControl)
> 
> # load modelplotr
> library(modelplotr)
> 
> # transform datasets and model objects to input for modelplotr
> scores_and_ntiles <- prepare_scores_and_ntiles(datasets=list("train","test"),
+                          dataset_labels = list("train data","test data"),
+                          models = list("rf","mnl"),
+                          model_labels = list("random forest","multinomial logit"),
+                          target_column="has_td",
+                          ntiles=100)
Warning: `select_()` was deprecated in dplyr 0.7.0.
ℹ Please use `select()` instead.
ℹ The deprecated feature was likely used in the modelplotr package.
  Please report the issue at <https://github.com/jurrr/modelplotr/issues>.
... scoring caret model "rf" on dataset "train".
... scoring caret model "mnl" on dataset "train".
... scoring caret model "rf" on dataset "test".
... scoring caret model "mnl" on dataset "test".
Data preparation step 1 succeeded! Dataframe created.
> 
> # set scope for analysis (default: no comparison)
> plot_input <- plotting_scope(prepared_input = scores_and_ntiles)
Data preparation step 2 succeeded! Dataframe created.
"prepared_input" aggregated...

Data preparation step 3 succeeded! Dataframe created.

No comparison specified, default values are used. 

Single evaluation line will be plotted: Target value "term.deposit" plotted for dataset "test data" and model "multinomial logit.
"
-> To compare models, specify: scope = "compare_models"
-> To compare datasets, specify: scope = "compare_datasets"
-> To compare target classes, specify: scope = "compare_targetclasses"
-> To plot one line, do not specify scope or specify scope = "no_comparison".


> 
> # customize all textual elements of plots
> mytexts <- customize_plot_text(plot_input = plot_input)
List with default values for all textual plot elements is created.
      To customize titles, axis labels and annotation text, modify specific list elements.
      E.g, when List is named 'mylist', to change the lift plot title to 'Cumulatieve Lift grafiek', use:
      mylist$cumlift$title <- 'Cumulatieve Lift grafiek'
      plot_cumlift(custom_plot_text = mylist)
> mytexts$cumresponse$plottitle <- 'Expected conversion rate for Campaign XYZ'
> mytexts$cumresponse$plotsubtitle <- 'proposed selection: best 15 percentiles according to our model'
> mytexts$cumresponse$y_axis_label <- '% Conversion'
> mytexts$cumresponse$x_axis_label <- 'percentiles (percentile = 1% of customers)'
> mytexts$cumresponse$annotationtext <-
+   "Selecting up until the &NTL percentile with model &MDL has an expected conversion rate of &VALUE"
> plot_cumresponse(data=plot_input,custom_plot_text = mytexts,highlight_ntile = 15)
Error in .make_numeric_version(x, strict, .standard_regexps()$valid_numeric_version) : 
  invalid non-character version specification 'x' (type: double)
Calls: plot_cumresponse ... as.numeric_version -> numeric_version -> .make_numeric_version
Execution halted