There are certain numbers that when read with fread()
don't match, like 2022.33
. Other options like read.csv
or read.table
work fine. It seems that the fread()
isn't correct here, is there a way to have it match read.table
?
Reproducible example:
library(data.table)
# Version 1.14.8
write.csv('2022.33', file = './test.csv', row.names = FALSE)
fread_results <- fread('./test.csv')
base_results <- read.csv('./test.csv')
fread_results$x - base_results$x
# Returns 2.273737e-13
identical(fread_results$x, base_results$x)
# False