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 simplifying external vector warning #334

Open
DavisVaughan opened this issue Feb 13, 2023 · 0 comments
Open

Consider simplifying external vector warning #334

DavisVaughan opened this issue Feb 13, 2023 · 0 comments

Comments

@DavisVaughan
Copy link
Member

DavisVaughan commented Feb 13, 2023

See tidyverse/dplyr#6718

CC @hadley, who provided the suggested simplifications

The existing warning seems to confuse some people since it mentions select() but that isn't always the verb being used

# Using an external vector in selections was deprecated in tidyselect 1.1.0.
# ℹ Please use `all_of()` or `any_of()` instead.
#   # Was:
#   data %>% select(var)
#   
#   # Now:
#   data %>% select(all_of(var))

What if we just simplified this one to

# Using an external vector in selections was deprecated in tidyselect 1.1.0.
# ℹ Please use `all_of(var)` or `any_of(var)` instead.

Or

# Using an external vector in selections was deprecated in tidyselect 1.1.0.
# ℹ Use `all_of(var)` to error if any elements of `var` are not found.
# ℹ Use `any_of(var)` to silently drop elements of `var` that are not found.
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

1 participant