title: How do I take row values from a column and combine them, sep by "," based on different column value?
body: <p>I am working with Proteomic data and testing differences between versions of the analysis software. We are wanting to have a table that lets us know in what versions of the software the proteins appear.</p>
  
  <p>Below is a simplified version of the data table I currently have:</p>
  
  <pre><code>Version Protein.ID Protein name
  1.1     A          name 1
  1.2     A          name 1
  1.1     B          name 2
  1.2     B          name 2
  </code></pre>
  
  <p>I want my table to look like this:</p>
  
  <pre><code>Version   Protein.ID Protein name
  1.1, 1.2  A          name 1
  1.1, 1.2  B          name 2
  </code></pre>
  
  <p>I have been looking for 2 days on here and the web and can not find a solution. </p>
  
  <p>I have tried using spread, and aggregate but neither worked. I either got a huge number of columns or a single column lacking the information I was after. I tried using some base R commands like paste but could not get rid of duplicate values.</p>
  
  <p>Example of something I tried:</p>
  
  <pre class="lang-r prettyprint-override"><code>allver.mergeVerID &lt;- spread(allver.ids, Protein.ID, Ver.ID.Porder)
  </code></pre>
  
  <pre><code>Error: Each row of output must be identified by a unique combination of keys. 
  Keys are shared for 5311 rows:
  </code></pre>
  
  <p>I also get this error using </p>
  
  <pre class="lang-r prettyprint-override"><code>allver.mergeVerID &lt;- allver.ids %&gt;% group_by(Protein.ID) %&gt;% 
    summarise(Ver.ID.Porder= toString(Ver.ID.Porder), )
  </code></pre>
  
  <p><b>OR </b></p>
  
  <pre class="lang-r prettyprint-override"><code>allver.mergeVerID &lt;- aggregate(Ver.ID.Porder ~ Protein.ID, allver.ids, toString)
  </code></pre>
  
  <p>What does this error mean?</p>