Session Ready
Exercise

NULL defaults

The cut() function used by cut_by_quantile() can automatically provide sensible labels for each category. The code to generate these labels is pretty complicated, so rather than appearing in the function signature directly, its labels argument defaults to NULL, and the calculation details are shown on the ?cut help page.

Instructions
100 XP
  • Update the definition of cut_by_quantile() so that the labels argument defaults to NULL.
  • Remove the labels argument from the call to cut_by_quantile().