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

consider accepting input like "dplyr::filter"? #77

Closed
ijlyttle opened this issue Nov 1, 2022 · 4 comments · Fixed by #82
Closed

consider accepting input like "dplyr::filter"? #77

ijlyttle opened this issue Nov 1, 2022 · 4 comments · Fixed by #82

Comments

@ijlyttle
Copy link

ijlyttle commented Nov 1, 2022

One of my favorite things to do is:

library("conflicted")
conflict_prefer("dplyr", "filter")

which does not provide the result I intend.
I think this happens because, in my head, I think "dplyr::filter".

Would you consider allowing the name argument to accept something like "dplyr::filter", or even dplyr::filter?

Happy to make a first stab at a PR, if you like.

Thanks!

@hadley
Copy link
Member

hadley commented Jan 10, 2023

Hmmm, I think it'd be rather hard to overhaul conflict_prefer() to accept this sort of syntax, so I think maybe a new name might be better?

And maybe we could avoid the problem in #75 by accepting multiple functions?

@hadley
Copy link
Member

hadley commented Jan 10, 2023

Name ideas:

  • conflict_pick()
  • conflict_favor() (my favo(u)rite expect for the UK/US issue)

@ijlyttle
Copy link
Author

Repeating the comment in #82, I had been noodling on names and thought conflict_favor() could work for this case; the "f" could signify fully-qualified function names.

@ijlyttle
Copy link
Author

I had thought also of conflict_pick() but there's a new pick() in tidy-eval (as you well know), which might be a bit too close.

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

Successfully merging a pull request may close this issue.

2 participants