Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upNA as a factor level malformed by rbindlist #3915
Comments
|
Same in devel. Thanks for reporting. Happens when printing DT having > 100 rows because of head&tail print format. root cause of the issue is data.table/R/print.data.table.R Line 61 in 5ab1884 minimal example x = data.table(V1 = factor(as.character(c(NA, 1:3, NA)), exclude = NULL))
rbindlist(list(x), use.names=FALSE)$V1
#Error in as.character.factor(x) : malformed factor |
Is this the expected behaviour?
Another example here: https://stackoverflow.com/q/58103098/4552295
I'm getting this result with
data.table_1.12.2andR version 3.6.1.