我正在尝试让分组选项起作用。当我选择分组时,我得到了错误的数据。以下是我的代码
> likert(GroupCD[16])
Item Strongly Disagree Disagree Neutral Agree Strongly Agree
1 Q16 0 0 10.71429 46.42857 42.85714
> likert(GroupCD[16],grouping = GroupCD$Group)
Group Item Strongly Disagree Disagree Neutral Agree Strongly Agree
1 C Q16 6.666667 33.33333 60.00000 0 0
2 D Q16 15.384615 61.53846 23.07692 0 0因为可以看到分组分隔时的值是错误的,或者我可能(也可能)使用了错误的值。
以下是group列
> print(GroupCD$Group)
[1] "C" "C" "C" "C" "C" "C" "C" "C" "C" "C" "C" "C" "C" "C" "C" "D" "D" "D" "D" "D" "D" "D" "D" "D" "D" "D" "D" "D"有什么建议吗?
编辑:这里是GroupCD16
"Q16"
"1" "Strongly Agree"
"2" "Strongly Agree"
"3" "Strongly Agree"
"4" "Strongly Agree"
"5" "Agree"
"6" "Agree"
"7" "Strongly Agree"
"8" "Strongly Agree"
"9" "Agree"
"10" "Strongly Agree"
"11" "Strongly Agree"
"12" "Neutral"
"13" "Strongly Agree"
"14" "Agree"
"15" "Agree"
"16" "Neutral"
"17" "Strongly Agree"
"18" "Strongly Agree"
"19" "Agree"
"20" "Agree"
"21" "Agree"
"22" "Agree"
"23" "Agree"
"24" "Strongly Agree"
"25" "Agree"
"26" "Neutral"
"27" "Agree"
"28" "Agree"发布于 2017-02-11 06:38:55
所以我可以结束这个:显然这是R工作区/会话(??)中的垃圾问题。一旦我用一个新的开始,一切都很好
https://stackoverflow.com/questions/41681840
复制相似问题