cld
制作一个紧凑的字母显示差异。最大的不同均值得到“a”,第二个得到“b”,依此类推。但是,我希望得到一个“a”的最小均值,即按升序排列的字母。
以下是帮助中可重复的示例:
data(warpbreaks)
amod <- aov(breaks ~ tension, data = warpbreaks)
tuk <- glht(amod, linfct = mcp(tension = "Tukey"))
tuk.cld <- cld(tuk)
tuk.cld
答案 0 :(得分:2)
我已向multcomp
包提交了一份文稿。现在decreasing
标志控制字母的顺序。将其设置为TRUE
将颠倒顺序。
data(warpbreaks)
amod <- aov(breaks ~ tension, data = warpbreaks)
tuk <- glht(amod, linfct = mcp(tension = "Tukey"))
tuk.cld <- cld(tuk)
tuk.cld
tuk.cld_dec <- cld(tuk, decreasing = TRUE)
tuk.cld_dec
答案 1 :(得分:0)
我不熟悉多线程包,但我注意到了
tuk.cld$mcletters$aLetters
[1] "a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "k" "l" "m" "n" "o" "p" "q" "r" "s"
[20] "t" "u" "v" "w" "x" "y" "z" "A" "B" "C" "D" "E" "F" "G" "H" "I" "J" "K" "L"
[ 39] "M" "N" "O" "P" "Q" "R" "S" "T" "U" "V" "W" "X" "Y" "Z"
我建议cld()
中有一个命令切换,可让您选择所需的任何标识符集。例如。
rev.lets<-rev(c(letters,LETTERS))