title: How to call randomForest predict for use with ROCR?
body: <p>I am having a hard time understanding how to build a ROC curve and now I came to the conclusion that maybe I don't create the model correctly. I am running a randomforest model in the dataset where the class attribute "y_n" is 0 or 1. I have divided the datasets as bank_training and bank_testing for the prediction purpose. 
  Here are the steps i do:</p>
  
  <pre><code>bankrf &lt;- randomForest(y_n~., data=bank_training, mtry=4, ntree=2,
                    keep.forest=TRUE, importance=TRUE)
  bankrf.pred &lt;- predict(bankrf, bank_testing, type='response',
                    predict.all=TRUE, norm.votes=TRUE)
  </code></pre>
  
  <p>Is it correct what I do till now? The bankrf.pred object that is created is a list object with 2 classes named: aggregate and individuals. I dont understand where did this 2 class names came out? Moreover when I run:</p>
  
  <pre><code>summary(bankrf.pred)
             Length Class  Mode     
  aggregate  22606  factor numeric  
  individual 45212  -none- character
  </code></pre>
  
  <p>What does this summary mean? The datasets (training &amp; testing) are 22605 and 22606 long each. If someone can explain me what is happening I would be very grateful. I think there is something wrong in all this.</p>
  
  <p>When I try to design the ROC curve with ROCR I use the following code:</p>
  
  <pre><code>library(ROCR)
  pred &lt;- prediction(bank_testing$y_n, bankrf.pred$c(0,1))
  
  Error in is.data.frame(labels) : attempt to apply non-function
  </code></pre>
  
  <p>Is just a mistake in the way I try to create the ROC curve or is it from the beginning with randomForest?</p>