title: How to change metrics using the library(caret)?
body: <p>I would like to change the metric from RMSE to RMSLE using the</p>
  
  <pre><code> caret library
  </code></pre>
  
  <p>Given some sample data:</p>
  
  <pre><code>  ivar1&lt;-rnorm(500, mean = 3, sd = 1)
    ivar2&lt;-rnorm(500, mean = 4, sd = 1)
    ivar3&lt;-rnorm(500, mean = 5, sd = 1)
    ivar4&lt;-rnorm(500, mean = 4, sd = 1)
    dvar&lt;-rpois(500, exp(3+ 0.1*ivar1 - 0.25*ivar2))
  
    data&lt;-data.frame(dvar,ivar4,ivar3,ivar2,ivar1)
  
  
  
    ctrl &lt;- rfeControl(functions=rfFuncs,
                    method="cv",
                    repeats = 5,
                    verbose = FALSE,
                    number=5)
  
  model &lt;- rfe(data[,2:4], data[,1], sizes=c(1:4), rfeControl=ctrl)
  </code></pre>
  
  <p>Here I would like to change to RMSLE and keeping the idea of the graph</p>
  
  <pre><code>plot &lt;-ggplot(model,type=c("g", "o"), metric="RMSE")+ scale_x_continuous(breaks = 2:4, labels = names(data)[2:4])
  </code></pre>