title: How to create Random Forest from scratch in R (without the randomforest package)
body: <p>This is the way I want to use Random Forest by using the <code>RandomForest</code> Package:</p>
  
  <pre><code>library (randomForest)
  rf1 &lt;- randomForest(CLA ~ ., dat, ntree=100, norm.votes=FALSE)
  p1 &lt;- predict(rf1, testing, type='response')
  confMat_rf1 &lt;- table(p1,testing_CLA$CLA)
  accuracy_rf1 &lt;- sum(diag(confMat_rf1))/sum(confMat_rf1)
  </code></pre>
  
  <p>I don't want to use the <code>RandomForest</code> Package at all. Given a dataset (<code>dat</code>) and using <code>rpart</code> and default values of <code>randomforest</code> package, how can I get the same results? For instance, for the 100 decision trees, I need to run the following:</p>
  
  <pre><code>for(i in 1:100){
  cart.models[[i]]&lt;-rpart(CLA~ ., data = random_dataset[[i]],cp=-1)
  } 
  </code></pre>
  
  <p>Where each <code>random_dataset[[i]]</code> would be randomly chosen default number of attributes and rows. In addition, does <code>rpart</code> used for <code>randomforest</code>?</p>