Skip to content
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

User friendly enhancements to == in filter() #3937

Closed
hadley opened this issue Oct 22, 2018 · 5 comments
Closed

User friendly enhancements to == in filter() #3937

hadley opened this issue Oct 22, 2018 · 5 comments
Milestone

Comments

@hadley
Copy link
Member

hadley commented Oct 22, 2018

These are common problems (particularly amongst newer users), that would be very nice to hint about:

blah <- 5
filter(df, blah == blah)
#> Warning: You did `x == x` which always equals TRUE.

filter(df, blah == c("x", "y"))
#> Warning: the right hand side of == has multiple values.
#> Did you mean blah %in% c("x", "y")?
filter(df, blah != c("x", "y"))

I think we could implement by providing a custom == override in the scope.

@romainfrancois
Copy link
Member

Do we want this for 0.8.0. This might be related to #3919 but could also be done independently if we want this right now.

@hadley
Copy link
Member Author

hadley commented Oct 23, 2018

I don't think we need to push this to the next release.

@S-UP

This comment has been minimized.

@hadley

This comment has been minimized.

@hadley
Copy link
Member Author

hadley commented Dec 10, 2019

Now tracking in tidyverse/funs#33

@hadley hadley closed this as completed Dec 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants