title: Assign unique ID based on two columns
body: <p>I have a dataframe (df) that looks like this:</p>
  
  <pre><code>School Student  Year  
  A         10    1999
  A         10    2000
  A         20    1999
  A         20    2000
  A         20    2001
  B         10    1999
  B         10    2000
  </code></pre>
  
  <p>And I would like to create a person <code>ID</code> column so that df looks like this:</p>
  
  <pre><code>ID School Student  Year  
  1   A         10    1999
  1   A         10    2000
  2   A         20    1999
  2   A         20    2000
  2   A         20    2001
  3   B         10    1999
  3   B         10    2000
  </code></pre>
  
  <p>In other words, the <code>ID</code> variable indicates which person it is in the dataset, accounting for both Student number and School membership (here we have 3 students total). </p>
  
  <p>I did <code>df$ID &lt;- df$Student</code> and tried to request the value +1 if <code>c("School", "Student)</code> was unique. It isn't working. Help appreciated. </p>