0

I have an object containing the data returned by the likert function from the likert package in R. It has the following data in it:

> 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

It has the data in correct order, viz. 3.1, 3.2 etc.

But when I plot this data using the plot function, it messes up the ordering on some basis, shown in the attached plot. Is there any way to preserve the ordering as such? enter image description here

Jaap
  • 81,064
  • 34
  • 182
  • 193
Vipin Verma
  • 5,330
  • 11
  • 50
  • 92
  • Please make your question [reproducible](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example/5963610). This means that besides including easy to paste data (preferably the output of `dput(data)`), you also need to include the code that you tried. This will make it much easier for others to help you. – Jaap Apr 27 '17 at 10:52

1 Answers1

1

Found the solution here Just need the replace the plot(facultyLikert) by plot(facultyLikert, group.order=names(facultyData))

This specifies the exact order of the y-axis

Where facultyData is the object containig the likert data.

Community
  • 1
  • 1
Vipin Verma
  • 5,330
  • 11
  • 50
  • 92