title: Re-ordering Factor Levels with Likert Package - R
body: <p>Using this page as a reference <a href="http://jason.bryer.org/likert/" rel="nofollow noreferrer">http://jason.bryer.org/likert/</a> I am finding that when I replicate Bryers code with my own data the likert factor levels are in the wrong order. This doesn't seem to happen with the demo code but does with mine.</p>
  
  <p>I plot with</p>
  
  <pre><code>plot(lexam, centered = FALSE, wrap = 30) 
  </code></pre>
  
  <p>to get the image you see</p>
  
  <p>I tried to amend with the following without success. </p>
  
  <pre><code>levels &lt;- c("Strongly Agree", "Agree", "Neutral", "Disagree","Strongly Disagree")
  lexam[] &lt;- lapply(lexam, function(x) factor(x, levels = levels))
  </code></pre>
  
  <p>Can anybody suggest what I can do to re-order the factor levels for the plot? You should see in the linked image where the problem is. <a href="https://i.stack.imgur.com/9zNaV.png" rel="nofollow noreferrer">Incorrect Likert Ordering</a></p>
  
  <p>Interestingly I've seen the same problem in other posts where it's not actually the problem being discussed. For example <a href="https://stackoverflow.com/questions/20057697/plot-percents-with-likert-package-doesnt-work-when-grouping">Plot Percents with Likert Package - Doesn`t work when grouping</a> you can see the same issue even though it's not the topic of discussion. </p>