title: Using R: Make a new column that counts the number of times 'n' conditions from 'n' other columns occur
body: <p>I have columns 1 and 2 (ID and value). Next I would like a count column that lists the # of times that the same value occurs per id. If it occurs more than once, it will obviously repeat the value. There are other variables in this data set, but the new count variable needs to be conditional only on 2 of them. I have scoured this blog, but I can't find a way to make the new variable conditional on more than one variable. </p>
  
  <pre><code>ID     Value     Count
  1        a         2 
  1        a         2 
  1        b         1
  2        a         2
  2        a         2
  3        a         1
  3        b         3
  3        b         3
  3        b         3
  </code></pre>
  
  <p>Thank you in advance!</p>