# NOT RUN {
table(fct_match(gss_cat$marital, c("Married", "Divorced")))
# Compare to %in%, misspelled levels throw an error
table(gss_cat$marital %in% c("Maried", "Davorced"))
# }
# NOT RUN {
table(fct_match(gss_cat$marital, c("Maried", "Davorced")))
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab