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
Emphasize that filter(x, A, B) is not strictly the same as filter(filter(x, A), B) #6968
Comments
Seems to me that in the second case there will be a different value for 'max(hp)' because of the pre-filtering of the dataset. Therefore the B's in the issue title are not the same in the compared cases. |
Yes, that's exactly the point. I'm not saying the behavior is wrong, I'm saying it may not be obvious how |
If you compare the two cases with identical values, the results are identical:
I think there is nothing wrong here... |
Not going to waste more of my time engaging when it's clear you haven't read the issue or my response carefully. |
Have had to re-confirm this for myself a few times:
This in
?dplyr
hints at what's going on:But this behavior is a bit more subtle / worth calling out IMO. This came up again recently here:
r-lib/lintr#2305 (comment)
FWIW it's also really not clear from reading the
filter.data.frame
implementation without being well-versed in {dplyr} internals.The text was updated successfully, but these errors were encountered: