To give you an idea of how to use a customized function within dplyr summarize() like functionality, the USA domestic airline dataset has been used. The objective is to calculate summary statistics (minimum, mean, median, and maximum) of the variables of interest over a possible combination of two other variables.