-
Notifications
You must be signed in to change notification settings - Fork 991
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
fails in the presence of AsIs
#4934
Comments
This seems due to an R upgrade, not data.table upgrade. |
Interesting, thanks @OfekShilon for tracking this. Could you share some more info like which R versions you used? I see R 4.0.3, and what was the other one? |
@jangorecki We're upgrading from R3.4, where this code passes. So while this isn't a data.table regression, I think this code really shouldn't fail - addition of "AsIs" to a class attribute shouldn't count as a class change. |
rbindlist
breaking change, with AsIsrbindlist
fails in the presence of AsIs
Maybe we should Actually this raises another bug... |
@MichaelChirico Maybe simply remove |
Ran the mentioned code with R3.4 with fill=FALSE Got similar to R4 error message:
Why does the fill argument change the |
Note that d <- list()
d[[1]] <- data.frame(a=1, b=I(2))
d[[2]] <- data.frame(a=3, b=4)
r<-do.call(rbind, d)
# a b
#1 1 2
#2 3 4
> class(r$b)
#[1] "AsIs" I believe |
* add fix #5309 * fix test numbering * add rbind for ITime * more tests * add merge tests * add AsIs #4934 * add news * news typo * add ignore.attr argument * fix news * change arguments of registered rbindlist * add attribute to usage * move nanotime tests * adjust test numbering * add test coverage * prohibit NA for ignore.att * move news * finish todo of #5857 * Update NEWS.md Co-authored-by: Michael Chirico <chiricom@google.com> * update comment * update doc for ignore.attr * fix nit ignoreattr * fix test consistency * remove setnames * update asis test to use rbindlist * update test comments * update NEWS num * NEWS wording * more NEWS wording * template message for i18n * simplify condition (C boolean --> no NA to worry about) * && not & * correct error message --------- Co-authored-by: Michael Chirico <chiricom@google.com> Co-authored-by: Michael Chirico <michaelchirico4@gmail.com>
This might be by design, but I couldn't find an explicit mention of it in
NEWS
, issue reports or elsewhere.We're trying to upgrade
data.table
from 1.11.8 to 1.13.6, and some of our tests break on code that simplifies to this:The
rbindlist
call succeeds in 1.11.8, but in 1.13.6 fails with:We suspect it's a regression, as
AsIs
class should not account as a class change - just inhibit coercion.Edit: turns out this surfaced due to an R3.4 -> R4.0.3 upgrade, not a data.table upgrade. Still, suggest it be considered for fixing.
#
Output of sessionInfo()
The text was updated successfully, but these errors were encountered: