title: String Manipulation/Agregation in dplyr
body: <p>I want to perform group_by and do a string operation for a data frame using dplyr</p>
  
  <pre><code>df&lt;-data.frame(varx=c("x1","x1","x2","x2","x2"),vary=c("y1","y2","y3","y4","y5"))
  </code></pre>
  
  <p>I want the output (newdf) to look like this:</p>
  
  <pre><code>newdf &lt;- data.frame(varx=c("x1","x2"),catY=c("y1,y2","y3,y4,y5"))
  </code></pre>
  
  <p>I tried the following in dplyr</p>
  
  <pre><code>df %&gt;% group_by(varx)%&gt;%summarise(catY=paste(vary))
  Error: expecting a single value
  </code></pre>
  
  <p>Also tried the following:</p>
  
  <pre><code>df %&gt;% group_by(varx)%&gt;%mutate(catY=paste(vary))
  
  Source: local data frame [5 x 3]
  Groups: varx
  </code></pre>
  
  <p>I can do it using basic data frame operation. <strong>Need help in understanding a way out in dplyr.</strong></p>