У меня есть данные опроса для 30+ вопросов по 5-балльной шкале Лайкерта (полностью согласен с категорически не согласен)
Вот некоторые примеры данных:
survey_df <- data.frame("ID" = c(1,2,3,4,5),
"Q1" = c("Strongly Agree", "Strongly Agree", "Agree", "Agree", "Neither"),
"Q2" = c("Agree", "Strongly Disagree", "Disagree", "Agree", "Neither"),
"Q3" = c("Neither", "Neither", "Disagree", "Agree", "Neither"))
Так что в основном я хочуперейти от этого:
ID Q1 Q2 Q3
1 Strongly Agree Agree Neither
2 Strongly Agree Strongly Disagree Neither
3 Agree Disagree Disagree
4 Agree Agree Agree
5 Neither Neither Neither
К этому:
Question Strongly.Agree Agree Neither Disagree Strongly.Disagree N.Count
Q1 0.4 0.4 0.2 0.0 0.0 5
Q2 0.0 0.4 0.2 0.2 0.2 5
Q3 0.0 0.2 0.6 0.2 0.0 5