改变R中Likert图的顺序

改变R中Likert图的顺序,r,ggplot2,likert,R,Ggplot2,Likert,我正在使用R中的likert包绘制测量数据。对于九个问题中的每一个(每个问题1-5个利克特量表),我将按男性和女性对数据进行分组 在我运行likert命令时创建的列表中,九个测量项目的名称存储为因子变量。但是,当我使用plot命令绘制数据时,绘图中的面板顺序与前面提到的因子变量不同。面板按字母顺序排列,而不是按级别顺序排列 如何更改面板的顺序 下面是我的likert列表的样子(很抱歉,我不知道如何向您显示数据) 所有这些看起来都很好,但当我试图绘制它时,绘图中面板的顺序与我的调查问题的顺序不匹配

我正在使用R中的
likert
包绘制测量数据。对于九个问题中的每一个(每个问题1-5个利克特量表),我将按男性和女性对数据进行分组

在我运行
likert
命令时创建的列表中,九个测量项目的名称存储为因子变量。但是,当我使用
plot
命令绘制数据时,绘图中的面板顺序与前面提到的因子变量不同。面板按字母顺序排列,而不是按级别顺序排列

如何更改面板的顺序

下面是我的likert列表的样子(很抱歉,我不知道如何向您显示数据)

所有这些看起来都很好,但当我试图绘制它时,绘图中面板的顺序与我的调查问题的顺序不匹配

plot(l_list, ordered = FALSE, group.order = c("M","F"))

以下是“dput(l_列表)”的输出,用于我的数据的缩写版本(以节省空间):


关于如何按照我的因子级别为
l\u list$results$Item
而不是按字母顺序获取面板的任何想法?

请粘贴
级别的输出(l\u list$results$Item)
。谢谢@Djork。我用要求的信息修改了我的原始帖子。请同时粘贴
dput(l\u列表)
的输出,给我们一个可复制的例子。@Djork我添加了dput(l\u列表)的输出。谢谢你的帮助。
[1] "My peers in class"                                    "The course lecturebook."
[3] "The online videos."                                   "The course blog."
[5] "The instructor, by asking asking questions in class." "The instructor, during office hours."                
[7] "Online resources outside blog."                       "Other students not in class."                        
[9] "TAs in tutorial room."  
plot(l_list, ordered = FALSE, group.order = c("M","F"))
structure(list(results = structure(list(Group = structure(c(1L, 
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 
2L), .Label = c("M", "F"), class = "factor"), Item = structure(c(1L, 
2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 
9L), .Label = c("My peers in class", "The course lecturebook.", 
"The online videos.", "The course blog.", "The instructor, by asking asking 
questions in class.", 
"The instructor, during office hours.", "Online resources outside blog.", 
"Other students not in class.", "TAs in tutorial room."), class = "factor"), 
`Completely useless` = c(0, 0, 0, 20, 0, 0, 20, 40, 0, 0, 
0, 0, 0, 0, 0, 0, 0, 0), `Somewhat useless` = c(0, 0, 0, 
20, 0, 0, 0, 40, 20, 0, 0, 0, 0, 0, 0, 0, 100, 0), `Neither/No opinion` = c(20, 
0, 20, 0, 0, 20, 0, 20, 40, 0, 0, 0, 0, 100, 0, 0, 0, 0), 
`Somewhat useful` = c(60, 60, 20, 60, 0, 0, 60, 0, 20, 100, 
0, 0, 100, 0, 0, 0, 0, 100), `Very useful` = c(20, 40, 60, 
0, 100, 80, 20, 0, 20, 0, 100, 100, 0, 0, 100, 100, 0, 0)), .Names = 
c("Group", 
"Item", "Completely useless", "Somewhat useless", "Neither/No opinion", 
"Somewhat useful", "Very useful"), row.names = c(NA, -18L), class = 
"data.frame"), 
items = structure(list(`My peers in class` = structure(c(5L, 
4L, 4L, 3L, 4L, 4L), .Label = c("Completely useless", "Somewhat useless", 
"Neither/No opinion", "Somewhat useful", "Very useful"), class = 
c("ordered", 
"factor")), `The course lecturebook.` = structure(c(4L, 5L, 
5L, 5L, 4L, 4L), .Label = c("Completely useless", "Somewhat useless", 
"Neither/No opinion", "Somewhat useful", "Very useful"), class = 
c("ordered", 
"factor")), `The online videos.` = structure(c(3L, 5L, 5L, 
5L, 5L, 4L), .Label = c("Completely useless", "Somewhat useless", 
"Neither/No opinion", "Somewhat useful", "Very useful"), class = 
c("ordered", 
"factor")), `The course blog.` = structure(c(1L, 4L, 4L, 
4L, 4L, 2L), .Label = c("Completely useless", "Somewhat useless", 
"Neither/No opinion", "Somewhat useful", "Very useful"), class = 
c("ordered", 
"factor")), `The instructor, by asking asking questions in class.` = 
structure(c(5L, 
5L, 3L, 5L, 5L, 5L), .Label = c("Completely useless", "Somewhat useless", 
"Neither/No opinion", "Somewhat useful", "Very useful"), class = 
c("ordered", 
"factor")), `The instructor, during office hours.` = structure(c(5L, 
5L, 5L, 5L, 5L, 3L), .Label = c("Completely useless", "Somewhat useless", 
"Neither/No opinion", "Somewhat useful", "Very useful"), class = 
c("ordered", 
"factor")), `Online resources outside blog.` = structure(c(4L, 
5L, 5L, 4L, 1L, 4L), .Label = c("Completely useless", "Somewhat useless", 
"Neither/No opinion", "Somewhat useful", "Very useful"), class = 
c("ordered", 
"factor")), `Other students not in class.` = structure(c(2L, 
1L, 2L, 3L, 1L, 2L), .Label = c("Completely useless", "Somewhat useless", 
"Neither/No opinion", "Somewhat useful", "Very useful"), class = 
c("ordered", 
"factor")), `TAs in tutorial room.` = structure(c(5L, 2L, 
4L, 3L, 4L, 3L), .Label = c("Completely useless", "Somewhat useless", 
"Neither/No opinion", "Somewhat useful", "Very useful"), class = 
c("ordered", 
"factor"))), .Names = c("My peers in class", "The course lecturebook.", 
"The online videos.", "The course blog.", "The instructor, by asking asking 
questions in class.", 
"The instructor, during office hours.", "Online resources outside blog.", 
"Other students not in class.", "TAs in tutorial room."), row.names = 
386:391, class = "data.frame"), 
grouping = structure(c(1L, 1L, 2L, 1L, 1L, 1L), .Label = c("M", 
"F"), class = "factor"), factors = NULL, nlevels = 5L, levels = 
c("Completely useless", 
"Somewhat useless", "Neither/No opinion", "Somewhat useful", 
"Very useful")), .Names = c("results", "items", "grouping", 
"factors", "nlevels", "levels"), class = "likert")