Save up to $499! Grab all Python courses for $49 or all online courses we’ve ever launched for only $169. Only Feb 11-16. Happy Valentine's!
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"))