title: R: how to split dataframe in foreach %dopar%
body: <p>This is a very simple example.</p>
  
  <pre><code>df = c("already ","miss you","haters","she's cool")
  df = data.frame(df)
  
  library(doParallel)
  cl = makeCluster(4)
  registerDoParallel(cl)    
  foreach(i = df[1:4,1], .combine = rbind, .packages='tm')  %dopar% classification(i)
  stopCluster(cl)
  </code></pre>
  
  <p>In real case I have dataframe with n=400000 rows.
  I don't know how to send nrow/ncluster data for each cluster in one step, i = ? </p>
  
  <p>I tried with isplitRows from library(itertools) without success.</p>