title: How to compute AUC under ROC in R (caret, random forest , svm)
body: <p>I am using random forest and support vector machine method in caret package in R. I want to calculate AUC under ROC for both cases; however, I do not know how to do it in this particular case. My outcome is coded as 0 and 1. Here is the example of code I am using :</p>
  
  <pre><code>set.seed(123)
  cvCtrl &lt;- trainControl(method = "cv", number = 10)
  rf_moded&lt;-train(readm30~.,data=train,method="rf", trControl=cvCtrl)
  </code></pre>