title: Use data.table set() to convert all columns from integer to numeric
body: <p>I am working with a data.table that has 1900 columns and roughly 280,000 rows.</p>
  
  <p>Currently, the data is entirely "integer", but I want them to explicitly "numeric" so I can pass it to a bigcor() function later. Apparently, bigcor() can only handle "numeric" and not "integer".</p>
  
  <p>I have tried:</p>
  
  <pre><code>full.bind &lt;- full.bind[,sapply(full.bind, as.numeric), with=FALSE]
  </code></pre>
  
  <p>Unfortunately, I get the error:</p>
  
  <pre><code>Error in `[.data.table`(full.bind, , sapply(full.bind, as.numeric), with = FALSE) : 
    j out of bounds
  </code></pre>
  
  <p>So, I tried using the data.table set() function, but I get the error:</p>
  
  <pre><code>Error in set(full.bind, value = as.numeric(full.bind)) : 
    (list) object cannot be coerced to type 'double'
  </code></pre>
  
  <p>I have created a simple reproducible example. Keep in mind, the actual columns are NOT "a", "b", or "c"; they are extremely complicated column names so referencing column individually is not a possibility.</p>
  
  <pre><code>dt &lt;- data.table(a=1:10, b=1:10, c=1:10)
  </code></pre>
  
  <p>So, my final questions are:</p>
  
  <p>1) Why does my sapply technique not work? (what is the "j out of bounds" error?)
  2) Why does the set() technique not? (why can't the data.table be coerced to numeric?)
  3) Does the bigcor() function require a numeric object, or is there another problem?</p>