title: R merge multiple lines of strings by ID variable
body: <p>I have a repeated free text variable at an ID variable level.
  What I'm currently trying to do is merge the free text variable at an ID variable level.</p>
  <p>What I have:</p>
  <pre><code>id = c(&quot;A1&quot;, &quot;A1&quot;, &quot;A2&quot;, &quot;A2&quot;)
  string = c(&quot;Hi&quot;, &quot;John&quot;, &quot;Hello&quot;, &quot;Sarah&quot;)
  have = data.frame(cbind(id, string))
  </code></pre>
  <p>What I want:</p>
  <pre><code>id2 = c(&quot;A1&quot;, &quot;A2&quot;)
  string2 = c(&quot;Hi John&quot;, &quot;Hello Sarah&quot;)
  want = data.frame(cbind(id2, string2))
  </code></pre>
  <p>Any suggestion/help is much appreciated</p>
  <p>Thanks!</p>