title: Plot multiple RFE results from caret in one plot
body: <p>I used caret's RFE algorithm with ROC as metric and want to plot the result. This works fine, but now I want to put two results in one plot and I'm not sure if there's an easy solution for this or if this is even possible. I'm sorry if this is a silly question, not too advanced in R. Is there a solution for this?</p>
  
  <p>Here's my code:</p>
  
  <pre><code># define the control using a random forest selection function
  rfFuncs$summary &lt;- twoClassSummary
  control &lt;- rfeControl(functions=rfFuncs, verbose = TRUE, method="cv", number=10)
  # run the RFE algorithm
  results_rfe_roc_deliv &lt;- rfe(data_deliverable[,1:91], data_deliverable[,92], sizes=c(1:91), rfeControl=control ,metric = 'ROC')
  # summarize the results
  print(results_rfe_roc_deliv)
  # list the chosen features
  predictors(results_rfe_roc_deliv)
  
  
  results_rfe_roc_non_deliv &lt;- rfe(data_non_deliverable[,1:91], data_non_deliverable[,92], sizes=c(1:91), rfeControl=control ,metric = 'ROC')
  # summarize the results
  print(results_rfe_roc_non_deliv)
  # list the chosen features
  predictors(results_rfe_roc_non_deliv)
  # plot the results
  
  plot(results_rfe_roc_deliv, type=c("g", "o"))
  plot(results_rfe_roc_non_deliv, type=c("g", "o"))
  </code></pre>
  
  <p>Normal plot generated from code:
  <a href="https://i.stack.imgur.com/E18LZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/E18LZ.png" alt="Plot generated from code"></a></p>