-
Notifications
You must be signed in to change notification settings - Fork 57
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
Allow functions and formulas with non-call RHS in across
#288
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good — just one question and can you please add a bullet to the top of NEWS.md
? It should briefly describe the change and end with (@yourname, #issuenumber)
.
|
||
expect_equal( | ||
capture_across(dt, across(a, function(x) log(x))), | ||
quo_squash(list(a = call2(function(x) log(x), quote(a)))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you construct the expected value a little more directly? I don't remember what quo_squash()
does off the top of my head.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, it was a mistake to have it there, thanks for catching that. In this case it wasn't doing anything. I've removed it.
Should be all set now |
This PR does two things. Included together since they're both expanding possible
across
inputs and both pretty small changes.dt_squash_call
for formulas whose RHS is not a call, allowing such formulas inacross
mutate
inconsistencies with dplyr #287I could separate these if needed (and if there's interest in accepting either of them)
Created on 2021-08-27 by the reprex package (v2.0.1)