-
Notifications
You must be signed in to change notification settings - Fork 420
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
Improved input validation #1407
Conversation
* Add new `check_unique_names()` * Refactor and update `check_list_of_ptypes()` and `check_list_of_functions()` * Add matching `check_list_of_bool()`
And fix arg name
And update error
! `values_from` must select at least one column. | ||
! Must select at least one item. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These used to report names_from
vs values_from
as the place where the problem came from, which was nice
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue: r-lib/tidyselect#327
dplyr::filter(n > 1L) | ||
dplyr::group_by(a, key) %>% | ||
dplyr::summarise(n = dplyr::n(), .groups = "drop") %>% | ||
dplyr::filter(n > 1L) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the tabbing is off? i.e. {data}
shouldn't be aligned with the following lines right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, but I gave up getting cli to not re-indent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh that is unfortunate
uncount(df, x, .id = "") | ||
Condition | ||
Error in `uncount()`: | ||
! `.id` must be a valid name or `NULL`, not the empty string "". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed in stringr error messages you backtick the ""
but we didn't do that in the rlang check functions
Using rlang's new
check_
helpers. Fixes #1400