title: Error: "Not compatible with requested type" when plotting varImp
body: <p>When training a model in R with the <code>caret</code> package, I get an error when plotting variable importances of the model. This happens for several mining algorithms (bayesglm, glm, naive_bayes, ...).</p>
  
  <pre><code>control &lt;- trainControl(method = "repeatedcv",
                        number = iterations,
                        savePredictions = TRUE,
                        classProbs = TRUE,
                        sampling = "smote");
  
  modelFit &lt;- train(formulaToUse,
                  data = dataToAnalyze,
                  method = miningAlgorithm, 
                  family = "binomial", 
                  preProcess = NULL, 
                  trControl = control,
                  tuneLength = 4);
  
  plot(varImp(modelFit, scale = TRUE));
  </code></pre>
  
  <p>results in:</p>
  
  <pre><code>Error in auc_(actual, predicted, ranks) : 
  Not compatible with requested type: [type=character; target=double].
  </code></pre>
  
  <p>Note that the models are mined with success, <code>summary(modelFit)</code> shows information about the model.</p>
  
  <p><strong>Any ideas?</strong></p>
  
  <p>R version is 3.4.3, caret is caret_6.0-79.</p>