title: How do I write a R script for patient data, that merge certain rows if a name appears twice, but keep values that are duplicates
body: <p>So far I have tried:</p>
  <pre><code>merged_data &lt;- Mock_spreadsheet %&gt;% 
    group_by(`pt name`) %&gt;%
    summarize(notes_merge = paste(notes, collapse = &quot;,&quot;), date = paste(`date of contact`, collapse = &quot;,&quot;))
  </code></pre>
  <p>But I need to keep values such as contact info which is identical for identical names.</p>
  <p>I would really appreciate any help!
  The data looks something like this:
  <a href="https://i.stack.imgur.com/rH8gs.png" rel="nofollow noreferrer">Original</a>
  I need it to turn out more like this:
  <a href="https://i.stack.imgur.com/DwoTA.png" rel="nofollow noreferrer">Output</a></p>