Reordering Likert plots in R

Viewed 379

I use the likert package to plot survey data.

require(likert)
data(pisaitems)

items24 <- pisaitems[,substr(names(pisaitems), 1,5) == 'ST24Q']

names(items24) <- c(
  ST24Q01="I read only if I have to.",
  ST24Q02="Reading is one of my favorite hobbies.",
  ST24Q03="I like talking about books with other people.",
  ST24Q04="I find it hard to finish books.",
  ST24Q05="I feel happy if I receive a book as a present.",
  ST24Q06="For me, reading is a waste of time.",
  ST24Q07="I enjoy going to a bookstore or a library.",
  ST24Q08="I read only to get information that I need.",
  ST24Q09="I cannot sit still and read for more than a few minutes.",
  ST24Q10="I like to express my opinions about books I have read.",
  ST24Q11="I like to exchange books with my friends.")

l24g <- likert(items24, grouping = pisaitems$CNT)
plot(l24g)

How can I reorder the grouping so that it shows the data in the same order as the data frame ("I read only if I have to." first an so on)?

Plot

0 Answers
Related