Functional programming with dplyr
问题 Looking for a more efficient / elegant way to pass multiple arguments to a group-by using non-standard evaluation in a function using dplyr. I don't want to use the ... operator, but to specify the functions individually. My specific use case is a function which takes a data frame and creates a ggplot object with simpler syntax. Here is an example of the code I want to automate with my function: # create data frame my_df <- data.frame(month = sample(1:12, 1000, replace = T), category = sample