title: Using dplyr to subset a data based on common values in one column from two data frames
body: <p>I have never really used dplyr and wondering how I can use it in the following context. So, I have following two data frames:</p>
  
  <pre><code> trainData &lt;- read.csv("train.csv", header = TRUE, stringsAsFactors = FALSE)
   subscriptionData &lt;- read.csv("subscriptions.csv", header = TRUE, stringsAsFactors = FALSE)
  &gt; head(trainData)
         account.id total
  1 001i000000NuOGY     0
  2 001i000000NuS8r     0
  3 001i000000NuPGw     0
  4 001i000000NuO7a     0
  5 001i000000NuQ2f     0
  6 001i000000NuOQz     0
  
  &gt; head(subscriptionData)
         account.id    season package no.seats          location           section price.level total multiple.subs
  1 001i000000LhyR3 2009-2010 Quartet        2     San Francisco Premium Orchestra           1   1.0            no
  2 001i000000NuOeY 2000-2001    Full        2     San Francisco         Orchestra           2   2.0            no
  3 001i000000NuNvb 2001-2002    Full        2 Berkeley Saturday     Balcony Front           3   2.0            no
  4 001i000000NuOIz 1993-1994 Quartet        1      Contra Costa         Orchestra           2   0.5            no
  5 001i000000NuNVE 1998-1999    Full        2   Berkeley Sunday      Balcony Rear           4   2.0            no
  </code></pre>
  
  <p>Now I want to take subset of <code>subscriptionData</code> based on the <code>account.id</code> of <code>trainData</code>. I basically want to take subset of <code>subscriptionData</code> with <code>account.id</code> that are also present in <code>trainData</code>.</p>
  
  <p>I know it's a very basic question but I am totally new dplyr and have no clue.  </p>