-
Notifications
You must be signed in to change notification settings - Fork 186
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
duplicate_argument_linter should skip on mutate() calls #1345
Comments
OTOH I don't like this style and, at least on older versions of WDYT? |
The problem IMO is every We have a Maybe we should have @hadley or @DavisVaughan weigh in here about |
I personally would convert the above to use pipe: x |>
dplyr::mutate(
col = col |> str_replace("t", "") |> str_replace("\\s+$", "xxx")
) But I don't thinking mutating a variable multiple times is an anti-pattern. dplyr copies the column involved, so it's not quite as expensive as you might think. |
OK, looks like an allowlist is the way to go then. not tagging for 3.0.0 release either. |
* Add exceptions for `duplicate_argument_linter()` Closes #1345 * Change argument default instead * address review comments * Update test-duplicate_argument_linter.R * more rewording of NEWS * #basePipe * wording in docs * manual roxy * vestigial Co-authored-by: Michael Chirico <chiricom@google.com>
dplyr::mutate()
allows sequential updates to variables, e.g.but
duplicate_argument_linter()
seescol
used twice and throws.The text was updated successfully, but these errors were encountered: