title: set positive class to 1 in R
body: <p>I'm currently working on preditive models with the 'randomForest' package. </p>
  
  <p>Fitting my model as follow</p>
  
  <pre><code>rf &lt;- foreach(ntree=rep(10, 3), .combine= combine,  .packages='randomForest') %dopar% {
  randomForest(bou~.,data=train, trees=50, importance=TRUE)}
  </code></pre>
  
  <p>When using 'confusionMatrix' from the 'caret' package, I've got the results below :</p>
  
  <p><a href="https://i.stack.imgur.com/VAD5l.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/VAD5l.jpg" alt="enter image description here"></a></p>
  
  <p>I'd like to know if it's possible to set the positive class to 1 in the model. I searched in the package description but couldn't find anything about it.</p>
  
  <p>Thank you very much.</p>
  
  <p>Edit : I've found it. It's an option in the 'confusionMatrix' command from the 'caret' package. I was lokking at the wrong place. Here an example if needed. </p>
  
  <pre><code>confusionMatrix(predicted,true_values,positive='1')
  </code></pre>
  
  <p>Should I leave my post or delete it ? </p>