converting data.table column from character to numeric seems to change uniqueness
<p>I need to convert a <code>data.table</code> character column into numeric. Somehow after conversion the unique numeric values don't seem to be unique anymore. I think it might be related to large numeric values. Any ideas on how to fix this?</p>

<pre><code>library(data.table)
options(scipen = 20)

DT = data.table(col_a = letters[1:5],
                col_b = as.character(72224192551488:72224192551492))
</code></pre>

<p>output num of entries by col_b (as expected)</p>

<pre><code>DT[, .N, by = col_b]

            col_b N
1: 72224192551488 1
2: 72224192551489 1
3: 72224192551490 1
4: 72224192551491 1
5: 72224192551492 1
</code></pre>

<p>convert col_b to numeric</p>

<pre><code>DT[, col_b := as.numeric(col_b)]
</code></pre>

<p>now the output looks different. I was expecting the same output though</p>

<pre><code>DT[, .N, by = col_b]

            col_b N
1: 72224192551488 5
</code></pre>