title: Counting how many times an element in one dataset is found in another
body: <p>I've been struggling with this problem in R. Basically, I've taken a subset of cities with flights that had a delay due to a carrier, and I need to figure out the total number of flights those cities had (delay or no delay). I can get the total number of flights per city pretty easily with:</p>
  
  <pre><code>count(flights, ORIGIN_CITY_NAME)
  </code></pre>
  
  <p>but I can't match that up to my data frame since they won't have the same number of rows. How can I filter that list so it only includes cities found in carrierDelayed?</p>
  
  <pre><code>require("dplyr")
  
  flights &lt;- read.csv("airplaneData.csv", header = TRUE, sep = ",")
  
  carrierDelayed &lt;- subset(flights, flights$CARRIER_DELAY &gt; 0)
  
  carrierPercent &lt;- data.frame(unique(carrierDelayed$ORIGIN_CITY_NAME), /* Total Count Should Go Here */)
  </code></pre>