Bruno Rodrigues explains why he likes tidyeval:
Last year, this column, let’s call it
spam
, had values1
forgood
and0
forbad
. This year the column is calledSpam
and the values are1
and2
. When I found out that this was the source of the problem, I just had to change the arguments of my functions fromgenerate_spam_plot(dataset = data2016, column = spam, value = 1) generate_spam_plot(dataset = data2016, column = spam, value = 0)
to
generate_spam_plot(dataset = data2017, column = Spam, value = 1) generate_spam_plot(dataset = data2017, column = Spam, value = 2)
without needing to change anything else. This is why I use
tidyeval
; without it, writing a function such asgenereta_spam_plot
would not be easy. It would be possible, but not easy.
Read the whole thing.