title: Drop levels of a factor when droplevels() doesn't work in R
body: <p>After subsetting variable <code>t</code> (which is a vector of <code>NULL</code>s) from my data.frame <code>D</code>, I get an object of class factor.</p>
  
  <p>I use <code>droplevels</code> to drop the levels and get a vector of <code>NULL</code>s, I was wondering why I can't still achieve a vector of <code>NULL</code>s?</p>
  
  <pre><code>D &lt;- read.csv("https://raw.githubusercontent.com/izeh/i/master/m.csv", h = T)
  
  L &lt;- split(D, D$study.name) ; L[[1]] &lt;- NULL
  
  t &lt;- lapply(1:length(L), function(i) L[[i]]$t)
  
  droplevels(t[[1]]) ## keep the vector of `NULL`s but drop the levels
  
  ## EXPECTED OUTPUT:
  [[1]]
  [1] NULL NULL NULL NULL NULL NULL
  </code></pre>