title: Adding a count column in one data frame with the count of matches in another data frame
body: <p>I would like to add a column to a data frame with the count of matches in another data frame, this seems pretty trivial but I can't seem to get it to work.  Example:</p>
  
  <pre><code>smaller_df$CountOfMatches &lt;- nrow(subset(larger_df, Date == smaller_df$Date))
  </code></pre>
  
  <p>This gives me the error:</p>
  
  <pre><code>In `==.default`(Date, smaller_df$Date) :
    longer object length is not a multiple of shorter object length
  </code></pre>
  
  <p>I know the data frames are different lengths, I'm not asking for a merge, I simply need for that for every row/date (valid date object) in the smaller_df; a count how many matches in the larger_df.</p>
  
  <p>I'm very new to R so there must be something fundamental and very trivial I'm missing here.</p>
  
  <p>Thanks in advance</p>