-
Notifications
You must be signed in to change notification settings - Fork 979
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
Internal error: DT passed to assign has not been allocated enough column slots #4100
Comments
This is still an issue in Here is a mini-example for a unit test: # options('datatable.alloccol' = 1024L)
df <- data.table::data.table(x = 1)
for (i in 1:2000) data.table::set(df, j = as.character(i), value = 1)
# Error in data.table::set(df, j = as.character(i), value = 1) :
# Internal error: DT passed to assign has not been allocated enough column slots. l=1025, tl=1025, adding 1 Adjusting |
Would adding Currently, one has two options: either adjust global |
It appears that set() does not always allocate enough slots. Example:
As indicated in the comment above, switching from "set(x, i, j, value)" to "DT[, c(j) := value]" makes it work. The situation seems similar as to what was reported in #1830.
sessionInfo() is:
The text was updated successfully, but these errors were encountered: