This is my dataframe:
or you may copy it:
structure(list(A_levels = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
College_Uni = c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1), CSEs = c(0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0), NVQ_HND_HNC = c(0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0), O_levels_GCSEs = c(1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1), Other_prof_qual = c(0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0), Prefer_not_to_answer = c(0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0), None_of_the_above = c(0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0), id = 5000:5010), row.names = c(NA, -11L), class = c("tbl_df",
"tbl", "data. Frame")) -> df
I want to mutate a edu_level of new variable, it's value according to this:
#my vairabe edu_level
#College_Uni high
#A_levels medium
#O_levels_GCSEs medium
#CSEs) low
#NVQ_HND_HNC low
#Other_prof_qual low
#Prefer_not_to_answer NA
#None_of_the_above NA
I think maybe because it is a multiple-choice question, some people have more than two levels, so I don't know how to specify the classification.
I want to choose the priority of its edu_level to be the highest degree first. For example, if it has both College_Uni and A_levels, the value of edu_level is high.