Skip to content
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

Consider allowing f in epi[x]_slide to be an unnamed data masking expression yielding a tibble #255

Closed
brookslogan opened this issue Dec 3, 2022 · 2 comments
Assignees
Labels
enhancement New feature or request P2 low priority

Comments

@brookslogan
Copy link
Contributor

This would improve compatibility with dplyr. However, it may introduce some ambiguities with the function&formula f case, and require some modifications to exactly how these cases are evaluated: if there is an f but no ..., we can't immediately distinguish between functions, formulas and data masking expressions; e.g., just using class won't work as it would force data masking expressions. Instead, we would need to (defuse and) evaluate f itself using data masking, then check the result's class: functions and formulas would need to be (validated and) evaluated in the normal fashion, while tibbles would be unpacked into multiple columns as in mutate and summarize. For consistency, f may also need to be evaluated in this way even if args are provided in ..., but we should only allow args in ... if it's actually a function (or formula?).

Generalizing f in this way may make it harder to validate f, and may make it impossible to immediately validate f without access to any data. Thus, whether or not to proceed may require some thought.

@dshemetov
Copy link
Contributor

This is addressed in #477 right? @brookslogan

@brookslogan
Copy link
Contributor Author

Yes. We side-stepped the tricky implementation here by just requiring the user add an extra comma... perhaps not ideal, but these seem like power-user features anyway and they can deal with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P2 low priority
Projects
None yet
Development

No branches or pull requests

2 participants