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 colClasses=NA_character_ incorrect #4237

Closed
mattdowle opened this issue Feb 11, 2020 · 0 comments · Fixed by #4238
Closed

fread colClasses=NA_character_ incorrect #4237

mattdowle opened this issue Feb 11, 2020 · 0 comments · Fixed by #4238
Milestone

Comments

@mattdowle
Copy link
Member

mattdowle commented Feb 11, 2020

Follow up to #1910. Not sure how this lasted so long.

> fread("A,B\n1,3\n2,4\n", colClasses=c(NA_character_, NA_character_))
       A     B      # correct
   <int> <int>
1:     1     3
2:     2     4
> fread("A,B\n1,3\n2,4\n", colClasses=NA_character_)
        A      B    # incorrect
   <char> <char>
1:      1      3
2:      2      4
> 

There's a length-1 specific case at C level which doesn't deal with the NA properly when colClasses is length 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants