You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The closer analogue is nested_ifelse_linter(), whose primary recommended alternatives are data.table::fcase() and dplyr::case_when().
But in that case, there are ways to avoid the nested ifelse() using base functions, so the user doesn't strictly need any new packages to fix the issue.
For length(unique(.)), there's no improvement in {base} (AFAIK).
Doesn't mean we shouldn't offer such a linter (since it'll be optional for users to turn on anyway), just by way of explaining why we didn't write that so far (it's certainly crossed my mind).
I would put that as a separate linter.
The closer analogue is
nested_ifelse_linter()
, whose primary recommended alternatives aredata.table::fcase()
anddplyr::case_when()
.But in that case, there are ways to avoid the nested
ifelse()
using base functions, so the user doesn't strictly need any new packages to fix the issue.For
length(unique(.))
, there's no improvement in {base} (AFAIK).Doesn't mean we shouldn't offer such a linter (since it'll be optional for users to turn on anyway), just by way of explaining why we didn't write that so far (it's certainly crossed my mind).
Originally posted by @MichaelChirico in #2051 (comment)
The text was updated successfully, but these errors were encountered: