title: Set R to include missing data – How can is set the `useNA="ifany"` option for `table()` as default?
body: <p>In many cases being aware of missing data is crucial and ignoring them can seriously impair your analysis. </p>
  
  <p>Therefore I'd like to set the <code>useNA = "ifany"</code> as default for <code>table()</code>. Ideally similar to <code>options(stringsAsFactors = FALSE)</code></p>
  
  <p>I found an ugly hack below, but it must go better and without defining a function.</p>
  
  <p><a href="https://stat.ethz.ch/pipermail/r-help/2010-January/223871.html" rel="nofollow">https://stat.ethz.ch/pipermail/r-help/2010-January/223871.html</a></p>
  
  <pre><code>tableNA&lt;-function(x) {
    varname&lt;-deparse(substitute(x))
    assign(varname,x)
    tabNA&lt;-table(get(varname),useNA="always")
    names(attr(tabNA,"dimnames"))&lt;-varname
    return(tabNA)
  }
  </code></pre>