-
Notifications
You must be signed in to change notification settings - Fork 993
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
rbindlist could use an "ignore.attributes" argument #3911
Comments
Since data.table 1.13.0 and fread reading dates as IDate I come across this issue all the time.
I think rbindlist should indeed ignore attributes in cases like this |
I just wanted to bump this issue as well - it's a real pain to have to specify |
This comment has been minimized.
This comment has been minimized.
I can only agree with this. Seems like a completely unnecessary step to add to a process, if the attributes could have just been ignored. |
I m working on this issue, will raise a PR soon. |
Binding
integer64
with integer/numeric works silently and correctly, whereas bindingIDate
withDate
fails and so does binding of attribute cols where one/more tables are empty (0-rows).integer 64 case:
The 2nd element's col
b
seems to be implicitly converted tointeger64
type without a message/warning.IDate case
First element's
b
column isIDate
and 2nd isDate
and there's an error.0-row data.table case:
Even if the empty table has a wrong type, it could be skipped as it doesn't really make it to the final table. (This used to work in previous versions when
fill=TRUE
-- probably accidental).In essence, I'd think it'd be immensely convenient to have an argument to ignore strict attributes check, e.g.,
ignore.attr=FALSE
(together with a global option so that code that has been written with old+lenient behaviour work continue to work) which would simply retain the first element's class.And if the default is to be strict, then, the first case should also error, for consistency.
The text was updated successfully, but these errors were encountered: