Session Ready
Exercise

Generalization

In the video, you learned that you can also generalize continuous values (essentially converting continuous values into categorical values). We generalized Salary into two categories using the functions mutate() and ifelse(). In this exercise, you'll be converting Salary into three categories instead.

Instructions
100 XP

dplyr and whitehouse are loaded in your workspace.

  • Convert the salaries that are
    • less than 50,000 to 0.
    • between 50,000 (including 50,000) and 100,000 to 1.
    • greater than and equal to 100,000 to 2.