Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Final quiz


Currently, the levels of marital status are Single, Divorced, Married, Widowed, and Separated. Instead, we want to have only two categories of marital status: single and married. For the sake of this exercise, we consider people who are Separated as single.


Change the factor levels of marital_status to single and married, as appropriate.

Stuck? Here's a hint!


personal_info$marital_status <- fct_collapse(
  single  = c("Single", "Divorced", "Widowed", "Separated"),
  married = c("Married"))