title: Correlation between numeric and logical variable gives (intended) error?
body: <p>Example data.</p>
  
  <pre><code>require(data.table)
  dt &lt;- data.table(rnorm(10), rnorm(10) &lt; 0.5)
  </code></pre>
  
  <p>Compute correlation between numeric and logical variables gives error.</p>
  
  <pre><code>cor(dt)
  #Error in cor(dt) : 'x' must be numeric
  </code></pre>
  
  <p>But error goes away when converting to a data frame.</p>
  
  <pre><code>cor(data.frame(dt))
  #           V1         V2
  #V1  1.0000000 -0.1631356
  #V2 -0.1631356  1.0000000
  </code></pre>
  
  <p>Is this intended behaviour for <code>data.table</code>?</p>