title: Get randomForest regression faster in R
body: <p>I have to make a regression with randomforest in R. My problem is that my dataframe is huge: I have 12 variables and more than 400k entries. When I try - the code is written in the bottom - to get a randomForest regression the system takes many hours to process the data: after 5, 6 hours of calculation, I am obliged to stop the operation without any output. Someone can suggests me how I can get it faster?
  Thanks</p>
  
  <pre><code>library(caret)
  library(randomForest)
  
  dataset &lt;- read.csv("/home/anonimo/Modelli/total_merge.csv", header=TRUE)
  dati &lt;- data.frame(dataset)
  attach(dati)
  
  
  trainSet &lt;- dati[2:107570,]
  testSet &lt;- dati[107570:480343,]
  
  output.forest &lt;- randomForest(dati$Clip_pm25 ~ dati$e_1 + dati$Clipped_so + dati$Clip_no2 + dati$t2m_1 + dati$tp_1 + dati$Clipped_nh  +  dati$Clipped_co + dati$Clipped_o3 + dati$ssrd_1 + dati$Clipped_no + dati$Clip_pm10 + dati$sp_1, data=trainSet, ntree=250)
  </code></pre>