title: occurrences of duplicated values and returning unique values separated by comma in R
body: <p>I have following dataframe in R</p>
  
  <pre><code> Number      ship_no
    4432          1
    4432          2
    4564          1
    4389          5
    6578          6
    4389          3
    4355          10
    4355          10
  </code></pre>
  
  <p>I want to find which duplicated <code>Number</code> are repeated in unique <code>ship_no</code> </p>
  
  <pre><code> Number       ship_no
    4432          1,2
    4389          5,3
    4355          10
  </code></pre>
  
  <p>How can I do this in r ?</p>
  
  <p>I attempted following code in R</p>
  
  <pre><code>library(dplyr)
  group_by(Number) %&gt;%
  filter(duplicated(Number)) %&gt;%
  summarize(Number = paste0(unique(ship_no), collapse = ','))
  </code></pre>