我的数据如下
Q1 Q2 Q3 Q4
Strongly Agree Strongly Agree Agree Agree
Agree Strongly Agree Agree Strongly Agree
Strongly Agree Disagree Strongly Disagree Disagree
Disagree Agree Strongly Agree Agree
Agree Agree Disagree Disagree
Strongly Disagree Strongly Disagree Disagree Disagree
我想制作一个频率为高度的分组条形图。图表底部的群组是“非常同意”,“同意”,“不同意”。和'强烈不同意'。然后在每个小组中都会有不同的问题。
这是我到目前为止所做的:
Question <- c(df$`Q24#1_4`, df$`Q24#1_1`, df$`Q24#1_2`, df$`Q24#1_3`)
ggplot(Question, aes(x = c('Strongly Disagree', 'Disagree', 'Agree',
'Sgrongly Agree'))) + geom_bar()