usa_education <- function(education_var) {
if(education_var <= 05) {
"Less than high school"
} else if (education_var == 06) {
"High school completion"
} else if (between(education_var, 07, 09)) {
"Some college or associate's degree"
} else if (education_var == 10) {
"Bachelor's degree"
} else if (education_var == 11) {
"Advanced degree"
} else {
"Missing/Unknown"
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.