title: use dplyr to concatenate a column
body: <p>I have a <code>data_frame</code> where I would like <code>vector</code> to be the concatenation of elements in <code>A</code>. So</p>
  
  <pre><code>df &lt;- data_frame(id = c(1, 1, 2, 2), A = c("a", "b", "b", "c"))
  df
  Source: local data frame [4 x 2]
  
    id A
  1  1 a
  2  1 b
  3  2 b
  4  2 c
  </code></pre>
  
  <p>Should become</p>
  
  <pre><code>newdf
  Source: local data frame [4 x 2]
  
    id vector
  1  1 "a b"
  2  2 "b c"
  </code></pre>
  
  <p>My first inclination is to use <code>paste()</code> inside <code>summarise</code> but this doesn't work.</p>
  
  <pre><code>df %&gt;% group_by(id) %&gt;% summarise(paste(A))
  Error: expecting a single value
  </code></pre>
  
  <p>Hadley and Romain talk about a similar issue in the <a href="https://github.com/hadley/dplyr/issues/154" rel="noreferrer">GitHub</a> issues, but I can't quite see how that applies directly. It seems like there should be a very simple solution, especially because <code>paste()</code> usually <em>does</em> return a single value.</p>