Real nice! Thanks! Just a question: I've seen quite a few tidyeval
answers lately (which is great, because it's about time I learn it for good however, the verb used to "capture" the input variable (not sure if it's the right term) is always different. Your answer uses enquo
:
group <- enquo(group)
group_by(df, !! group) %>%
This answer to another question uses enexpr
:
my_col <- enexpr(my_col)
output <- data %>%
mutate(!!my_col := as.integer(!!my_col))
Both your answer and the other answer then apply !!
to the result of enquo
/enexpr
. Is there a reason to prefer enquo
or enexpr
?