Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fread breaks with reading numeric fields as integer via colClasses #2863

Closed
renkun-ken opened this issue May 11, 2018 · 0 comments
Closed

fread breaks with reading numeric fields as integer via colClasses #2863

renkun-ken opened this issue May 11, 2018 · 0 comments
Milestone

Comments

@renkun-ken
Copy link
Member

@renkun-ken renkun-ken commented May 11, 2018

The following examples breaks in the latest release:

library(data.table)

csv <- "
a,b,c
1,2,3.0
2,3,4.5
"

fread(csv, colClasses = c("integer", "integer", "integer"))
   a b             c
1: 1 2 4.658976e-310
2: 2 3 4.658976e-310

It does not work even if c is purely integer but with decimal points:

a,b,c
1,2,3.0
2,3,4.0

My session info:

R version 3.4.4 (2018-03-15)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04 LTS

Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/openblas/libblas.so.3
LAPACK: /usr/lib/x86_64-linux-gnu/libopenblasp-r0.2.20.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8    LC_PAPER=en_US.UTF-8      
 [8] LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] data.table_1.11.2

loaded via a namespace (and not attached):
[1] compiler_3.4.4 tools_3.4.4   
@mattdowle mattdowle added this to the 1.11.6 milestone Jun 3, 2018
@jangorecki jangorecki removed this from the 1.12.0 milestone Jun 6, 2018
@jangorecki jangorecki added this to the 1.11.6 milestone Jun 6, 2018
@mattdowle mattdowle removed this from the 1.11.6 milestone Sep 20, 2018
@mattdowle mattdowle added this to the 1.12.0 milestone Sep 20, 2018
@mattdowle mattdowle removed this from the 1.12.0 milestone Jan 6, 2019
@mattdowle mattdowle added this to the 1.12.2 milestone Jan 6, 2019
@mattdowle mattdowle removed this from the 1.12.2 milestone Jan 11, 2019
@mattdowle mattdowle added this to the 1.12.0 milestone Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants