You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When fread has to bump many columns to a different data type, R can crash. This dataset with 10k rows and 40 columns makes R consistently crash:
library(data.table)
# Create a character column that is mostly empty,
# so it gets bumped.
x <- character(1e4)
x[9994] <- "+"
# For very powerful machines, you might need to
# increase the number of rows a little.
dfr <- as.data.frame(
replicate(40, x, simplify = FALSE)
)
write.table(dfr, "test.txt", quote = FALSE)
fread("test.txt")