title: Adding a line with rbind changes the nature of columns in data.table in R
body: <p>I am taking a data.table:</p>
  
  <pre><code>DT &lt;- data.table(num=c(1,4,6,7,8,12,13, 15), let=rep(c("A","B"), each=4))
  </code></pre>
  
  <p>An then I have the following result:</p>
  
  <pre><code>&gt; sapply(DT, class)
      num         let 
  "numeric" "character" 
  </code></pre>
  
  <p>Which is ok.</p>
  
  <p>Then, adding a line:</p>
  
  <pre><code>DT&lt;-rbind(DT, as.list(c(8, "B")))
  </code></pre>
  
  <p>And then:</p>
  
  <pre><code>&gt; sapply(DT, class)
      num         let 
  "character" "character" 
  </code></pre>
  
  <p>I find this vicious that R changed the first column type to character and did not expect it ... I can change the column to numeric afterwards but it's painfull if I have to check after every insert.</p>
  
  <p>Is there's a way to add line without this drawback?</p>