Open hadley opened 4 years ago
It probably should be stricter than vars_pull()
(see #251), which entails some design work and probably a dedicated interpreter as in eval_select()
.
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.
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.
Equivalent of
vars_pull()
with new interface; works likeeval_select()
but must select exactly one columns. (And negative values count backwards from RHS)