title: R session is aborted using random forest of "caret" package
body: <p>The table has <code>560,304</code> rows, and <code>10</code> columns. I used the <code>caret package random Forest</code> to train my model. Before training, I defined my columns time and classification types. other columns do not need direct type defining.  I used <code>rose</code> sampling because of the data imbalanced classification. I did not use the first column because it is the identifier. Here is my code:</p>
  
  <pre><code>require(openxlsx)
  library(chron)
  library(caret)
  library(randomForest)
  
  set.seed(9560)
  record&lt;-read.xlsx('_3.xlsx',sheet =1 , colNames = TRUE,
                    rowNames = FALSE, skipEmptyRows = TRUE)
  
  #Define column types
  record$TIME &lt;- chron(times=record$TIME)
  record$Is.Fraud &lt;- factor(record$Is.Fraud)
  
  
  MyControl &lt;- trainControl(method = "repeatedCV", repeats=5, 
                            sampling="rose")
  #train model 
  rfModel &lt;- train(record$Is.Fraud ~.,data=record[,2:10],method='rf',
                   trControl=MyControl)
  </code></pre>
  
  <p>However, the <code>R session</code> is aborted and crashed. </p>
  
  <p>when I <code>upsample</code> data and use two different random Forest and combine them there is no problem even when I use <code>upsampling</code> instead of <code>rose</code>. the following code works fine:</p>
  
  <pre><code>upSmp&lt;-upSample(x = record[, 2:9],y=record$Is.Fraud)
  upSmp &lt;- upSmp[sample(nrow(upSmp)),]
  rdFrst1&lt;-randomForest(Class ~.,data=upSmp[1:(nrow(upSmp)/2),])
  rdFrst2&lt;-randomForest(Class ~.,data=upSmp[((nrow(upSmp)/2)+1):nrow(upSmp),])
  rf.combined &lt;- combine(rdFrst1,rdFrst2)
  </code></pre>
  
  <p>I think there is a problem with my memory when I use <code>repeatedcv</code>. What is my problem? Can I handle it in <code>caret</code> train function with combining two random forest like how I used <code>RandomForest</code> function and combined models?</p>
  
  <p>I attached the step it is stoped in <img src="https://i.stack.imgur.com/o9UZP.png" alt="here">.</p>