title: Collapsing every 4 sequential text rows of same author in r
body: <p>I would like to combine every four post of an author in an extensive dataframe, and if there are less than four posts left combine those (e.g, an author has 11 posts, I end up with 2 post of 4 and 1 post of 3).</p>
  
  <p>Here is an example of my data frame:</p>
  
  <pre><code>name  text
  bee   _ so we know that right           
  bee   said so           
  alma  hello,            
  alma  Good to hear back from you.           
  bee   I've currently written an application         
  alma  I'm happy about it            
  bee   It was not the last.          
  alma  Will this ever stop.          
  alma  Yet another line.         
  alma  so            
  </code></pre>
  
  <p>I would like to change it into this:</p>
  
  <pre><code>name  text
  bee   _ so we know that right said so I've currently written an application It was not the last.
  alma  hello, Good to hear back from you. I'm happy about it Will this ever stop
  alma  Yet another line. so
  </code></pre>
  
  <p>Here is the initial data frame:</p>
  
  <pre><code>df = structure(list(name = c("bee", "bee", "alma", "alma", "bee", "alma", "bee", "alma", "alma", "alma"), text = c( "_ so we know that right", "said so", "hello,", "Good to hear back from you.", "I've currently written an application", "I'm happy about it", "It was not the last.", "Will this ever stop.", "Yet another line.", "so")), .Names = c("name", "text"), row.names = c(NA, -10L), class = "data.frame")
  </code></pre>