title: Is there a way of selecting all records of a certain ID after randomly selecting the IDs?
body: <p>I have a number of values per ID in this format:</p>
  <pre><code>ID  Var1 Var2 Var3
  1    A     A    C
  1    C     B    B
  1    B     D    A
  2    C     B    C
  2    D     B    A
  2    D     A    D
  3    A     D    B
  3    B     C    C
  3    C     B    A
  4    A     A    D
  4    C     B    C
  4    B     B    A
  5    D     B    B
  5    A     C    C
  5    D     C    C
  </code></pre>
  <p>I want to randomly select IDs but keep all values per ID, so for example, if I wanted to get 2 random IDs; the outcome would look like this:</p>
  <pre><code>ID  Var1 Var2 Var3
  2    C     B    C
  2    D     B    A
  2    D     A    D
  5    D     B    B
  5    A     C    C
  5    D     C    C
  </code></pre>
  <p>Giving me, ID 2 &amp; 5.</p>