Closed krlmlr closed 3 years ago
This is with_data()
;)
It looks like this function only lives in the examples?
Would it be too bad to introduce quo_eval()
and expr_eval()
as safer and less ambiguous alternatives to eval_tidy()
? We still need to think of a name that also works in situations when we test-drive tidy evaluation without a data mask.
Forgot to mention the motivation for this question: https://community.rstudio.com/t/how-to-pass-optional-quosures-to-a-tibble/34371/9. CC @courtiol.
I think we need expand()
as eval + enexpr and with_data()
as eval_tidy + enquo.
expand()
is already a tidyr verb. IMO, with_data(data = NULL)
looks weird.
It's not necessarily a concern for rlang that expand()
is a tidyverse verb.
I think it looks fine:
mtcars %>% with_data(cyl + am)
Also discussed in #591.
Let's keep thinking about this.
For new users test-driving tidy evaluation (e.g. the
{{}}
mustaches), it would help to have a shortcut that operates like a quoting function. What would be a good name foreval_tidy_quo()
?Created on 2019-07-17 by the reprex package (v0.3.0)