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

Use tidyselect allow_empty #1549

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Use tidyselect allow_empty #1549

wants to merge 2 commits into from

Conversation

olivroy
Copy link
Contributor

@olivroy olivroy commented Apr 25, 2024

Just testing if my PR in tidyselect seems to work as expected.

Not to be merged.

Edit: the genuine snapshot failures (caused by the addition of a classed error) actually nods that this change in tidyselect would be useful for tidyr.

For example

    (expect_error(pivot_wider(df, names_from = key, values_from = starts_with("foo")))
    )
  Output
-   <error/rlang_error>
+   <error/tidyselect:::error_disallowed_empty>
    Error in `pivot_wider()`:
    ! Must select at least one item.

Could be improved if the eval_select() call had error_arg = "foo"

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 this pull request may close these issues.

None yet

1 participant