title: Fast way to replace all blanks with NA in R data.table
body: <p>I have a large data.table object (1M rows and 220 columns) and I want to replace all blanks ('') with NA. I found a solution in this <a href="https://stackoverflow.com/questions/24172111/change-the-blank-cells-to-na">Post</a>, but it's extremely slow for my data table (takes already over 15mins) 
  Example from the other post:</p>
  
  <pre><code> data = data.frame(cats=rep(c('', ' ', 'meow'),1e6),
                     dogs=rep(c("woof", " ", NA),1e6))
   system.time(x&lt;-apply(data, 2, function(x) gsub("^$|^ $", NA, x)))
  </code></pre>
  
  <p>Is there a more data.table fast way to achieve this?</p>
  
  <p>Indeed the provided data does not look much like the original data, it was just to give an example. The following subset of my real data gives the CharToDate(x) error:</p>
  
  <pre><code>DT &lt;- data.table(ID=c(10),DEFAULT_DATE=as.Date("2012-07-31"),value='')
  system.time(DT[DT=='']&lt;-NA)
  </code></pre>