title: predict function in RandomForest package gives different results from randomForest with xtest and ytest options
body: <p>I am perplexed by the different results I obtained when I ran code like this: </p>
  
  <pre><code>set.seed(100) 
  test1&lt;-randomForest(BinaryY~., data=Xvars, trees=51, mtry=5, seed=200) 
  predict(test1, newdata=cbind(NewBinaryY, NewXs), type="response") 
  </code></pre>
  
  <p>and this code: </p>
  
  <pre><code>set.seed(100) 
  test2&lt;-randomForest(BinaryY~.,data=Xvars,trees=51, mtry=5,seed=200,xtest=NewXs, ytest=NewBinY)   
  </code></pre>
  
  <p>The confusion matrices for the two forests I thought would be the same by virtue of the same seed settings, but they differ as do the predicted values as well as the votes.  At first I thought it was just the way ties were broken, so I changed the number of trees to an odd number so there are no ties anymore.  </p>
  
  <p>Can anyone shed light on what I am hoping is a simple oversight?  I just can't figure out why the results of the predictions from these two forests applied to the NewBinaryYs and NewX data sets would not be the same.</p>
  
  <p>Also, I noticed that the results are the same when I am only using 1 tree.  </p>
  
  <p>Thanks for any hints and help. </p>