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

eval_pull() #189

Open
hadley opened this issue Apr 23, 2020 · 3 comments
Open

eval_pull() #189

hadley opened this issue Apr 23, 2020 · 3 comments
Labels
feature a feature request or enhancement pull

Comments

@hadley
Copy link
Member

hadley commented Apr 23, 2020

Equivalent of vars_pull() with new interface; works like eval_select() but must select exactly one columns. (And negative values count backwards from RHS)

@lionel- lionel- added feature a feature request or enhancement pull labels May 8, 2020
@lionel-
Copy link
Member

lionel- commented Mar 3, 2022

It probably should be stricter than vars_pull() (see #251), which entails some design work and probably a dedicated interpreter as in eval_select().

@hadley
Copy link
Member Author

hadley commented Aug 11, 2022

I'd be tempted to say that eval_pull() should be exactly eval_select() with the added restriction that it must return a single column. That would allow syntax that's not that useful, but a single tidyselect syntax would be easier to explain and to implement.

OTOH the different meanings of df |> select(-1) and df |> pull(-1) is going to make this at least a little tricky.

@lionel-
Copy link
Member

lionel- commented Aug 11, 2022

Random thought, it seems like it might be useful for interactive usage to allow helpers like starts_with() and matches() or predicate functions in pull(). This would always select the first matching element and throw an error if none.

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

No branches or pull requests

2 participants