title: Create a dataframe from two vectors of unequal length in R
body: <p>I have two vectors of unequal length. Let's call them group1 and group2.</p>
  <pre><code>group1 &lt;- c(1,2,3)
  group2 &lt;- c(6,7,8,9,10)
  </code></pre>
  <p>I want to create a dataframe like:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th style="text-align: center;">key</th>
  <th style="text-align: center;">value</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td style="text-align: center;">group1</td>
  <td style="text-align: center;">1</td>
  </tr>
  <tr>
  <td style="text-align: center;">group2</td>
  <td style="text-align: center;">6</td>
  </tr>
  <tr>
  <td style="text-align: center;">group2</td>
  <td style="text-align: center;">7</td>
  </tr>
  <tr>
  <td style="text-align: center;">group1</td>
  <td style="text-align: center;">2</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>...So on</p>
  <p>I know how to do it if the length of the vectors is the same: just create a <strong>tibble</strong> and then <strong>gather</strong> it.
  But what to do in this case?</p>