Problem 10.6: These questions refer to the diamonds data table in the ggplot2 package. Take a look at the codebook (using help()) so that you'll understand the meaning of the tasks. (Motivated by Garrett Grolemund.)
Each of the following tasks can be accomplished by a statement of the form:
diamonds %>%
verb1(args1) %>%
verb2(args2) %>%
arrange(desc(args3)) %>%
head(1)
For each task, give appropriate R functions or arguments to substitute in place of verb1, verb2, args1, args2, and args3.
Which color diamonds seem to be largest on average (in terms of carats)?
Which clarity of diamonds has the largest average "table" per carat?