title: Remove rows based on factor-levels
body: <p>I have a data.frame <code>df</code> in format "long".</p>
  
  <pre><code>df &lt;- data.frame(site = rep(c("A","B","C"), 1, 7),
                   time = c(11,11,11,22,22,22,33),
                   value = ceiling(rnorm(7)*10))
  df &lt;- df[order(df$site), ]
  
  df
    site time value
  1    A   11    12
  2    A   22   -24
  3    A   33   -30
  4    B   11     3
  5    B   22    16
  6    C   11     3
  7    C   22     9
  </code></pre>
  
  <h2>Question</h2>
  
  <p>How do I remove the rows where an unique element of <code>df$time</code> is not present for each of the levels of <code>df$site</code> ?</p>
  
  <p>In this case I want to remove <code>df[3,]</code>, because for <code>df$time</code> the timestamp 33 is only present for site A and not for site B and site C.</p>
  
  <p>Desired output:</p>
  
  <pre><code>df.trimmed
    site time value
  1    A   11    12
  2    A   22   -24
  4    B   11     3
  5    B   22    16
  6    C   11     3
  7    C   22     9
  </code></pre>
  
  <p>The data.frame has easily 800k rows and 200k unique timestamps. I don't want to use loops but I don't know how to use vectorized functions like <code>apply()</code> or <code>lapply()</code> for this case.</p>