Closed dholstius closed 7 years ago
@hadley: I agree that this is inconsistent, and wt should accept both character and formula in tally_(). The inconsistencies are even more severe in tidyr.
@krlmlr yes, I think we'll definitely want to take another pass at this for the next release (using everything we've learned in lazyeval etc)
@lionel- another one for you
Should this be tally(my_data, wt = !! symbol("bar"))
?
@hadley what's the rule for which verbs should support strings? group_by()
supports strings but select()
does not.
Yes, I think so.
I think generally verbs shouldn't support strings without some syntactic signal. select()
has one_of()
, and with tidyeval we can now use !!
.
sounds good, closing this then.
Passing the name(s) of variables (as character) "just works" in most underscored ("programmatic") dplyr functions. For example:
But, it looks like this has yet to be supported in
tally_
(and hence, also incount_
).Proposed: these should also work:
Happy to construct test cases, pull request, etc. but not sure if this might be intended behavior — or if/how it intersects with the intended behavior of
lazyeval::interp
(relied upon bytally_
).