data.table - Have a double column be a character column when loading data in R -


i trying load database

there column contains quite long strings correspond code numbers (for instance 078000000000000000)

when load data, r turns these numbers double (so 7,8 e+15)

if try turn character as.character, becomes "7,8 e+15" still lose information

by way, when loading data i'm using :

my_data <- fread(file) 

and data correct, although there type problem

see documentation. data.table can read in 64bit integers if install bit64 package.

install.packages("bit64") fread("078000000000000000       ") #                  v1 #1: 78000000000000000 

or importing characters:

fread("078000000000000000       ", colclasses = "character") #                   v1   #1: 078000000000000000 

Comments

Popular posts from this blog

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

html - How to custom Bootstrap grid height? -

transpose - Maple isnt executing function but prints function term -