-
Notifications
You must be signed in to change notification settings - Fork 2.1k
all.equal() problems #2751
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
Comments
I think that's ok, although I feel like there's probably quite a few places where I rely on An alternative fix would be to write our own |
@hadley: Are we including this in dplyr 0.6.0? |
No, it'll have to wait until the next version. |
Is it clear when this fix will be included in dplyr? |
Most are related to tidyverse/dplyr#2751
Are there any thoughts on when/if attribute checking might be implemented? I'm creating a For now I'm using a (rather janky) workaround with a custom |
In case this is useful, dplyr's library(tibble)
d1 <- tibble(id = 1:3, x = tibble(a = 1:3, y = 1:3))
d2 <- tibble(id = 1:3, x = tibble(a = 1:3, y = NA))
# works fine
all.equal(d1, d1)
#> [1] TRUE
all.equal(d1, d2)
#> [1] "Component \"x\": Component \"y\": Modes: numeric, logical"
#> [2] "Component \"x\": Component \"y\": target is numeric, current is logical"
library(dplyr, warn.conflicts = FALSE)
# broken
all.equal(d1, d1)
#> Error: Can't join on 'x' x 'x' because of incompatible types (tbl_df/tbl/data.frame / tbl_df/tbl/data.frame)
all.equal(d1, d2)
#> Error: Can't join on 'x' x 'x' because of incompatible types (tbl_df/tbl/data.frame / tbl_df/tbl/data.frame) Created on 2019-02-04 by the reprex package (v0.2.1.9000) |
I have been beaten by this (and went crazy 😓) in the last few days. expect_equal(as.data.frame(object), as.data.frame(expected)) HTH |
Quick question: the tolerance issue mentioned as the first bullet point of the first message hasn't been resolved or am I missing something? It would really be nice to be able to account for small differences like |
I think we should plan to rip out the existing |
And update newly failing tests. Fixes #2751
And update newly failing tests. Fixes #2751
This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/ |
all.equal.tbl_df()
#2264)dplyr
Would it be too much of a change to get rid of this override altogether? I propose to emit a warning that
all_equal()
should be used on tibbles in v0.6, and then remove the specialization in v0.7.CC @hadley @jennybc.
The text was updated successfully, but these errors were encountered: