Descriptive table in R with more than one grouping variable I have a data frame that looks like below.