title: How to drop unused levels after filtering by factor?
body: <p>Here is an example that was taken from <a href="https://stackoverflow.com/q/24679950">a fellow SO member</a>.</p>
  
  <pre><code># define a %not% to be the opposite of %in%
  library(dplyr)
  # data
  f &lt;- c("a","a","a","b","b","c")
  s &lt;- c("fall","spring","other", "fall", "other", "other")
  v &lt;- c(3,5,1,4,5,2)
  (dat0 &lt;- data.frame(f, s, v))
  #  f      s v
  #1 a   fall 3
  #2 a spring 5
  #3 a  other 1
  #4 b   fall 4
  #5 b  other 5
  #6 c  other 2
  (sp.tmp &lt;- filter(dat0, s == "spring"))
  #  f      s v
  #1 a spring 5
  (str(sp.tmp))
  #'data.frame':  1 obs. of  3 variables:
  # $ f: Factor w/ 3 levels "a","b","c": 1
  # $ s: Factor w/ 3 levels "fall","other",..: 3
  # $ v: num 5
  </code></pre>
  
  <p>The df resulting from <code>filter()</code> has retained <em>all</em> the levels from the original df.</p>
  
  <p>What would be the recommended way to drop the unused level(s), i.e. <code>"fall"</code> and <code>"others"</code>, within the <code>dplyr</code> framework?</p>