title: Add values to dataframe when condition met in R
body: <p>I have a dataframe like this: </p>
  
  <pre><code>ID1   ID2   Position  Grade   Day
  234   756      2        87     27
  245   486      4        66     26
  321   275      1        54     20
  768   656      6        51     7
  421   181      1        90     14
  237   952      8        68     23
  237   553      4        32     30
  </code></pre>
  
  <p>And I have another dataframe like this:</p>
  
  <pre><code>ID1   ID2   Day  Count
  234   756    2     3 
  245   486    2     1
  209   706    2     1
  124   554    2     2
  237   553    2     4
  </code></pre>
  
  <p>I need to add the Counts to the first dataframe where the ID1, ID2 and Day are matched. However, I also need to have it so that if there is no match (no Counts in the second dataframe for the set of ID1, ID2 and Day in the first dataframe) then a zero is put in that place.  So the final dataframe would be something like: </p>
  
  <pre><code>ID1   ID2   Position  Grade   Day   Count
  234   756      2        87     27     3
  245   486      4        66     26     1
  321   275      1        54     20     0
  768   656      6        51     7      0
  421   181      1        90     14     0
  237   952      8        68     23     0
  237   553      4        32     30     4
  </code></pre>