-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
arrange not reporting syntax errors on .by_group #6980
Comments
For me your Line 88 in b359331
arrange.data.frame <- function(.data,
...,
.by_group = FALSE,
.locale = NULL) {
dots <- enquos(...)
if (.by_group) { ## my remark : skipped if .by_groups
dots <- c(quos(!!!groups(.data)), dots)
}
loc <- arrange_rows(.data, dots = dots, locale = .locale)
dplyr_row_slice(.data, loc)
} Why to have a warning for everything ? To type |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
When using
arrange
on grouped data (and wanting to respect the grouping), we need to use the.by_group
argument. However, if you make a syntax error - e.g.by_group
or.by_groups
- then the arranging fails to respect the groups silently. This has the potential to lead to serious errors in analysis.Created on 2024-01-08 with reprex v2.0.2
I assume this is happening because of the
...
argument combined with passing an object set toTRUE
. I think there needs to be something here that either checks for arguments similar to.by_group
but miss-spelt, or some other method to warn / throw an error in such circumstances. Failing to group silently seems a bit dangerous.The text was updated successfully, but these errors were encountered: