-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Automatically unpack in across()
#6360
Comments
See also #5563 |
UI proposed by @lionel- and I Essentially the idea is to add one more layer on top of what we already get back from
# Default
# Same as:
# `.names = "{col}_{fn}", .unpack = "{outer}_{inner}"`
across(x:y, quantiles, .names = NULL, .unpack = TRUE)
# Don't unpack
across(x:y, quantiles, .unpack = FALSE)
# Unpack with a specific glue spec
across(x:y, quantiles, .unpack = "{outer}.{inner}") |
I assume you discussed and rejected adding another variable to the existing |
Note: We also realized that we'd probably have to default it to |
I think having the additional argument is nice because we are going to need it regardless to be able to opt-in to the unpacking (or out if we figure out a way to allow it to default to I think putting the glue spec in across(
x:y,
list(lag = ~multilag(.x, 1:5), double = ~.x * 2),
.names = "{col}.{fn}",
.unpack = "{outer}.{inner}"
) In this example when
|
To support this sort of functionality:
The text was updated successfully, but these errors were encountered: