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
To lint for instances of which(x == min(x)) or which(x == max(x)), which should be avoided in favour of more efficient which.min() or which.max(), respectively.
I would rather name it which_optimum_linter(), or combine it with the pending which_grepl_linter() from #884 and just call it which_linter() more generally
As astutely noted by @AshesITR, the two versions of the code in the original post aren't equivalent and therefore don't make a good candidate for a new linter. Pity.
To lint for instances of
which(x == min(x))
orwhich(x == max(x))
, which should be avoided in favour of more efficientwhich.min()
orwhich.max()
, respectively.Ref: https://csgillespie.github.io/efficientR/performance.html
The text was updated successfully, but these errors were encountered: