title: Re-populate a sequence of continuous ID variable by another ID variable in R
body: <p>Apologies for the vagueness of the title.</p>
  <p>Hopefully the following example will make more sense.</p>
  <pre><code>have = data.frame(id = c(&quot;A1&quot;,&quot;A1&quot;,&quot;A1&quot;,&quot;A1&quot;,&quot;A1&quot;,&quot;A1&quot;,&quot;A2&quot;,&quot;A2&quot;,&quot;A2&quot;,&quot;A2&quot;,&quot;A2&quot;,&quot;A2&quot;),
                    id2 = c(1,1,2,2,3,3,1,1,2,2,3,3))
  want = data.frame(id = c(&quot;A1&quot;,&quot;A1&quot;,&quot;A1&quot;,&quot;A1&quot;,&quot;A1&quot;,&quot;A1&quot;,&quot;A2&quot;,&quot;A2&quot;,&quot;A2&quot;,&quot;A2&quot;,&quot;A2&quot;,&quot;A2&quot;),
                    id2 = c(1,1,2,2,3,3,4,4,5,5,6,6))
  </code></pre>
  <p>How can I go from have to want by using dplyr package? I have over a million # of obs in my df in this structure.</p>
  <p>Any help would be much appreciated! Thanks heaps!</p>