title: Deleting groups that don't appear in every time period and data frame
body: <p>I am cleaning data with multiple time periods in each data frame with multiple data frames. Each data frame has one year of data. I want to delete groups that do not appear in each time period(within the data frame), and delete groups that do not appear in each data frame. In other words, I want to keep groups that exist in every time period, across each data frame.  I created data with an ID, time variable, and two variables that represent my data. My data will have more data frames, IDs, groups and variables as well.</p>
  
  <pre><code>t&lt;-c(1,1,2,2,3,3,3,4,4,4)
  id&lt;-c(200,300,200,300,100,200,300,200,300,400)
  x1&lt;-rnorm(1:10)
  x2&lt;-rnorm(1:10)
  ?df
  df&lt;-data.frame(id,t,x1,x2)
  t&lt;-c(1,1,1,2,2,3,3,3,4,4)
  id&lt;-c(200,300,400,200,300,200,300,400,200,300)
  x1&lt;-rnorm(1:10)
  x2&lt;-rnorm(1:10)
  df2&lt;-data.frame(id,t,x1,x2)
  id&lt;-c(200,300,200,300,600,200,300,100,200,300)
  t&lt;-c(1,1,2,2,2,3,3,4,4,4)
  x1&lt;-rnorm(1:10)
  x2&lt;-rnorm(1:10)
  df3&lt;-data.frame(id,t,x1,x2)
  rb&lt;-rbind(df,df2,df3)
  rb
  cb&lt;-cbind(df,df2,df3)
  cb
      id t          x1          x2  id t            x1         x2  id t          x1            x2
  1  200 1  0.37223136 -0.04918183 200 1  0.6489171399 -0.1324335 200 1 -0.41387676 -0.4566678425
  2  300 1 -0.22062416  0.05150952 300 1 -0.3669090613  3.0826144 300 1  0.48237987 -0.0325861333
  3  200 2  0.32912208  1.03922999 400 1  0.9347859735  0.1026632 200 2 -0.31308242 -0.3021501845
  4  300 2 -0.18172302 -1.41669927 200 2  0.4814364147 -0.1087465 300 2 -1.52273626  0.6357750776
  5  100 3 -0.81072008  0.64522238 300 2 -0.5676866296  0.2371230 600 2 -0.09687669  2.2883585934
  6  200 3  0.45175343  0.64197622 200 3  0.0006852893  0.5830704 200 3  0.01726120 -0.5905109745
  7  300 3  0.40465989 -0.70796588 300 3 -0.0008717189 -1.1969493 300 3 -0.18603781  0.3722390396
  8  200 4  0.09852108 -1.76958443 400 3  0.9343534507 -1.3671447 100 4 -0.57308316  0.4749221706
  9  300 4 -0.53951022  0.97306346 200 4  1.9176422485  0.9879788 200 4  0.40222133  0.3278821640
  10 400 4  0.24271562 -1.37269617 300 4  1.4298971045  1.6095265 300 4  0.85799186  0.0006593401
  </code></pre>
  
  <p>My final out put would look like this:</p>
  
  <pre><code>id  t          x1          x2
  200 1  0.37223136 -0.04918183 
  300 1 -0.22062416  0.05150952
  200 2  0.32912208  1.03922999
  300 2 -0.18172302 -1.41669927
  200 3  0.45175343  0.64197622
  300 3  0.40465989 -0.70796588
  200 4  0.09852108 -1.76958443
  300 4 -0.53951022  0.97306346
  200 1  0.6489171399 -0.1324335
  300 1 -0.3669090613  3.0826144
  200 2  0.4814364147 -0.1087465
  300 2 -0.5676866296  0.2371230
  200 3  0.0006852893  0.5830704
  300 3 -0.0008717189 -1.1969493
  200 4  1.9176422485  0.9879788
  300 4  1.4298971045  1.6095265
  200 1 -0.41387676 -0.4566678425
  300 1  0.48237987 -0.0325861333
  200 2 -0.31308242 -0.3021501845
  300 2 -1.52273626  0.6357750776
  200 3  0.01726120 -0.5905109745
  300 3 -0.18603781  0.3722390396
  200 4  0.40222133  0.3278821640
  300 4  0.85799186  0.0006593401
  </code></pre>