title: R Data.Table Split Numeric Column and Do Operation
body: <pre><code>data=data.frame("VAR1"= c(105,607,111),
  "VAR2"=c(7,19,13))
  </code></pre>
  
  <p>I have <code>VAR1</code> and wish to create <code>VAR2</code> with a simple rule, I take the first digit from <code>VAR1</code> and multiply it by 2 and then add the last two numbers, so it looks like this for digit 111 in <code>VAR1</code>: 2*1 + 11 = 13.</p>