On another topic When non-standard should evaluation be used and why? @nick mentioned that using symbols in a function argument that do not represent objects is now discouraged in the tidyverse.
Why is this? Will that capability be removed from the tidyverse in the future?
What about the case where the symbols are never meant to represent an object, for example a hypothetical function call like:
hfunc(source, a:1:q:z)
in a problem domain where a syntax like a:1:q:z is commonly used to specify a pattern, a process, or whatever.
If only symbols that represent objects are allowed the function would need signature something like
hfunc(source, c("a", "1", "q", "z"))
which would really be clumsy for a domain expert used to a:1:q:z .
BTW the enquo and friends are quite happy to parse and argument like a:1:q:z ...
I think that the tidyverse opens R up to domain experts who are not statisticians but just want to poke at their data, do simple stats and make plots (maybe with two Y axes
) and the recommendation (and maybe prohibition??) that symbols must represent objects closes this off to them a bit.
Thanks,
Dan