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 limit the risk of false positive, I'm thinking to limit this to the apply() family function (+ replicate()), at least as a first step. Or do you think it wouldn't be much more difficult and riskier to do this in all contexts?
ideally, this should detect also both tidyverse (~ mean(.x)) and base (\(x) mean(x)) lambda functions
I'm thinking to limit it to cases with a single argument, i.e. exclude:
lapply(l, function(x) mean(x, na.rm=TRUE))
even though the anonymous function could be removed here as well by forwarding the ... because users might find it clearer to not forward them.
The text was updated successfully, but these errors were encountered:
On Tue, Sep 6, 2022, 9:29 AM Hugo Gruson ***@***.***> wrote:
Can you see any potential issues / pitfalls?
If you agree this would be a good addition, I can start working on a PR
soon (now that I understand a little better how the package works).
—
Reply to this email directly, view it on GitHub
<#1531 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB2BA5IYKDDDUBGQPGPWV5LV45WOHANCNFSM6AAAAAAQF7YDXU>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
Example
Discouraged
Recommended
Scope
to limit the risk of false positive, I'm thinking to limit this to the
apply()
family function (+replicate()
), at least as a first step. Or do you think it wouldn't be much more difficult and riskier to do this in all contexts?ideally, this should detect also both tidyverse (
~ mean(.x)
) and base (\(x) mean(x)
) lambda functionsI'm thinking to limit it to cases with a single argument, i.e. exclude:
even though the anonymous function could be removed here as well by forwarding the
...
because users might find it clearer to not forward them.The text was updated successfully, but these errors were encountered: