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 should properly handle NA in colClasses argument #1910

jangorecki opened this Issue Nov 10, 2016 · 0 comments


None yet
1 participant

jangorecki commented Nov 10, 2016

str(data.table::fread("a,b\n1,a", colClasses=c(NA, "factor")))
#Classes ‘data.table’ and 'data.frame':	1 obs. of  2 variables:
# $ a: Factor w/ 1 level "1": 1
# $ b: Factor w/ 1 level "a": 1
str(read.csv(textConnection("a,b\n1,a"), colClasses=c(NA, "factor")))
#'data.frame':	1 obs. of  2 variables:
# $ a: int 1
# $ b: Factor w/ 1 level "a": 1


also an issue with mixed character and factor results was fixed:

fread("a,b\n1,a", colClasses=c("character", "factor"))

@jangorecki jangorecki added the fread label Nov 10, 2016

@jangorecki jangorecki added this to the v1.9.8 milestone Nov 10, 2016

@jangorecki jangorecki self-assigned this Nov 14, 2016

jangorecki added a commit to jangorecki/data.table that referenced this issue Nov 15, 2016

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