我有一个对象,其中包含StackLayouts
函数从R中的likert
包返回的数据。它包含以下数据:
likert
它的数据顺序正确,即。 3.1,3.2等。
但是当我使用> facultyLikert
Item Strongly disagree Disagree Neither agree nor disagree Agree Strongly agree
1 3.1 Increased student engagement 0.000000 7.142857 28.57143 57.14286 7.142857
2 3.2 Instructional time effectiveness increased 7.142857 0.000000 28.57143 21.42857 42.857143
3 3.3 Increased student confidence 0.000000 0.000000 21.42857 57.14286 21.428571
4 3.4 Increased student performance in class assignments 0.000000 7.142857 35.71429 50.00000 7.142857
5 3.5 Increased learning of the students 0.000000 7.142857 42.85714 42.85714 7.142857
6 3.6 Added unique learning activities 0.000000 0.000000 14.28571 57.14286 28.571429
函数绘制这些数据时,它会在某些基础上弄乱排序,如附图所示。有没有办法保持这样的排序?
答案 0 :(得分:1)
找到解决方案this file
只需要将plot(facultyLikert)
替换为plot(facultyLikert, group.order=names(facultyData))
这指定了y轴的确切顺序
其中facultyData
是包含Likert数据的对象。