title: Select multiple duplicate rows based on specific values in next column
body: <p>This is a follow up question to Kikapp's <a href="https://stackoverflow.com/questions/16905425/find-duplicate-values-in-r">answer</a>. </p>
  
  <p>I want to remove participant IDs which lack all the time-points. In other way around, I want to select rows which have all the four time (11, 21, 31, 41). See the sample data <a href="https://www.dropbox.com/s/e0vng9zjelyrkuv/df.csv?dl=0" rel="nofollow noreferrer">dropbox link</a></p>
  
  <p>Here is my try based on Kikapp's answer. For some reason, it doesn't work. Let me know how to make it better. </p>
  
  <pre><code>data2 &lt;- df[df$ID %in% names(table(df$ID))[table(df$ID) &gt; 3],] 
  </code></pre>
  
  <p>I get 4695 rows or objects or IDs for <code>time == 11</code>, <code>time == 21</code>,<code>time == 41</code> while 4693 for <code>time == 31</code>; however, I want they should be equal.</p>