title: convert factor to date with empty cells
body: <p>I have a factor vector <code>x</code> looking like this:</p>
  
  <pre><code>""
  "1992-02-13"
  "2011-03-10"
  ""
  "1998-11-30"
  </code></pre>
  
  <p>Can I convert this vector to a date vector (using <code>as.Date()</code>)?</p>
  
  <p>Trying the obvious way gives me:</p>
  
  <pre><code>&gt; x &lt;- as.Date(x)
  Error in charToDate(x) :
  character string is not in a standard unambiguous format
  </code></pre>
  
  <p>At the moment I solve this problem like this:</p>
  
  <pre><code>&gt; levels(x)[1] &lt;- NA
  &gt; x &lt;- as.Date(x)
  </code></pre>
  
  <p>But this doesn't look too elegant...</p>
  
  <p>Thank you in advance!</p>