在我的调查中,我犯了一个错误的 5 点李克特量表,如下所示:
dput(head(edu_data))
structure(list(Education.1. = structure(c(1L, 1L, 1L, 1L, 1L,
1L), .Label = c("", "Y"), class = "factor"), Education.2. = structure(c(1L,
1L, 1L, 1L, 1L, 1L), .Label = c("", "Y"), class = "factor"),
Education.3. = structure(c(1L, 1L, 1L, 1L, 1L, 1L), .Label = c("",
"Y"), class = "factor"), Education.4. = structure(c(1L, 1L,
1L, 2L, 2L, 1L), .Label = c("", "Y"), class = "factor"),
Education.5. = structure(c(2L, 2L, 2L, 1L, 1L, 1L), .Label = c("",
"Y"), class = "factor")), row.names = c(NA, 6L), class = "data.frame")
我想将其更改为具有单个值的一列,使得 answer_to_ls= 1:5
我想要得到的输出将是一个带有单个数字的列,这意味着摆脱字母。我当然有唯一的受访者 ID
请告诉我,如果我想成为社区中有价值的一员,我能否以某种方式更清楚地说明我的问题。