我收到以下错误消息时遇到问题:第一个月
我想在我的分析中指出一个紧凑的字母显示,但它没有工作。我试图在互联网上找到一些解决方案,但它失败了。有人能帮助我吗?这是我的data
structure(list(Ratio = c(0.267055286, 0.235446484, 0.224992335,
0.228212575, 0.257381176, 0.256859674, 0.243903929, 0.252712714,
0.241461807, 0.248338451, 0.256563425, 0.26601715, 0.250073217,
0.251969117, 0.253287549, 0.263241548, 0.269360378, 0.264825074,
0.25672374, 0.2534554, 0.246267242, 0.246695711, 0.236139498,
0.249491444, 0.251564819, 0.240452818, 0.254713159, 0.25147281,
0.26201919, 0.248360746, 0.246830304, 0.266038937, 0.26905912,
0.24791562, 0.247594584, 0.256053813, 0.251228178, 0.246707173,
0.250456004, 0.27637359, 0.26508449, 0.262086576, 0.256718454,
0.248851991, 0.248653789, 0.252162637, 0.257240293, 0.256834233,
0.28264247, 0.29802879, 0.258576741, 0.277733515, 0.296467765,
0.286141117, 0.277513708, 0.273090289, 0.278239429, 0.267859464,
0.264483192, 0.276063591, 0.262313997, 0.246508881, 0.279584358,
0.287600757, 0.279089811, 0.278508984, 0.255397803, 0.282189954,
0.281931686, 0.274297023, 0.314339694, 0.190332237, 0.200487283,
0.221774473, 0.194636823, 0.212372143, 0.191236662, 0.172644425,
0.22595976, 0.198123319, 0.211837134, 0.215018989, 0.195312021,
0.20158237, 0.184286731, 0.19498543, 0.196400274, 0.17994453,
0.208702986, 0.220364396, 0.202560056, 0.202323629, 0.209563815,
0.211821257, 0.211889051, 0.169961202, 0.165792165, 0.143280229,
0.141520745, 0.155981145, 0.1505676, 0.169778706, 0.148619699,
0.14276644, 0.182916256, 0.134962743, 0.162540603, 0.147899504,
0.172803323, 0.171328653, 0.148332232, 0.17731353, 0.137293375,
0.167809004, 0.187015484, 0.16659136, 0.143882683, 0.195064548,
0.145268859, 0.139506029, 0.158491822, 0.161545847, 0.142343264,
0.172845598, 0.140114282, 0.14208018, 0.147465037, 0.158342427,
0.141087175, 0.152013369, 0.152338253, 0.147960271, 0.159925355,
0.127860026, 0.147602983, 0.152138695, 0.169946914, 0.151562855,
0.130802593, 0.161859989, 0.12996254, 0.155459895, 0.150915199,
0.16102091, 0.151073748, 0.169443662, 0.138065717, 0.141765129,
0.168697363, 0.180178444, 0.152726489, 0.132928661, 0.137527664,
0.162030059, 0.156803768, 0.144039257, 0.177741017, 0.162964524,
0.17659578, 0.141199988, 0.158541033, 0.156337255, 0.147436957,
0.155102179, 0.167067911, 0.158620908, 0.15569626), Strain = c("a_ M1", "a_ M1", "a_ M1", "a_ M1", "a_ M1", "a_ M1", "a_ M1", "a_ M1", "a_ M1", "a_ M1", "a_ M1", "a_ M1", "a_ M1", "a_ M1", "a_ M1", "a_ M1", "a_ M1", "a_ M1", "a_ M1", "a_ M1", "a_ M1", "a_ M1", "a_ M1", "a_ M1", "a_N1", "a_N1", "a_N1", "a_N1", "a_N1", "a_N1", "a_N1", "a_N1", "a_N1", "a_N1", "a_N1", "a_N1", "a_N1", "a_N1", "a_N1", "a_N1", "a_N1", "a_N1", "a_N1", "a_N1", "a_N1", "a_N1", "a_N1", "a_N1", "a_ H1", "a_ H1", "a_ H1", "a_ H1", "a_ H1", "a_ H1", "a_ H1", "a_ H1", "a_ H1", "a_ H1", "a_ H1", "a_ H1", "a_ H1", "a_ H1", "a_ H1", "a_ H1", "a_ H1", "a_ H1", "a_ H1", "a_ H1", "a_ H1", "a_ H1", "a_ H1", "b_S1", "b_S1", "b_S1", "b_S1", "b_S1", "b_S1", "b_S1", "b_S1", "b_S1", "b_S1", "b_S1", "b_S1", "b_S1", "b_S1", "b_S1", "b_S1", "b_S1", "b_S1", "b_S1", "b_S1", "b_S1", "b_S1", "b_S1", "b_S1", "B_H1", "B_H1", "B_H1", "B_H1", "B_H1", "B_H1", "B_H1", "B_H1", "B_H1", "B_H1", "B_H1", "B_H1", "B_H1", "B_H1", "B_H1", "B_H1", "B_H1", "B_H1", "B_H1", "B_H1", "B_H1", "B_H1", "B_H1", "B_H1", "B-O1", "B-O1", "B-O1", "B-O1", "B-O1", "B-O1", "B-O1", "B-O1", "B-O1", "B-O1", "B-O1", "B-O1", "B-O1", "B-O1", "B-O1", "B-O1", "B-O1", "B-O1", "B-O1", "B-O1", "B-O1", "B-O1", "B-O1", "B-O1", "b_N1", "b_N1", "b_N1", "b_N1", "b_N1", "b_N1", "b_N1", "b_N1", "b_N1", "b_N1", "b_N1", "b_N1", "b_N1", "b_N1", "b_N1", "b_N1", "b_N1", "b_N1", "b_N1", "b_N1", "b_N1", "b_N1", "b_N1", "b_N1"), species = c("a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "a", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b")), class = "data.frame", row.names = c(NA,
-167L))
这是剧本
library(datasets)
library(ggplot2)
library(multcompView)
library(dplyr)
library(datasets)
library(tidyverse)
library(multcomp)
Data = read.csv("data.csv", h= TRUE)
qplot(x = species, y = Ratio, geom = "point", data = Data) +
facet_grid(.~Strain)
# creating a variable as factor for the ANOVA
Data$Strain <- as.factor(Data$Strain)
Data$species <- as.factor(Data$species)
str(Data)
# analysis of variance
anova <- aov(Ratio ~ Strain*factor(species), data = Data)
summary(anova)
# table with factors, means and standard deviation
data_summary <- group_by(Data, Strain, species) %>%
summarise(mean=mean(Ratio), sd=sd(Ratio)) %>%
arrange(desc(mean))
print(data_summary)
# Tukey's test
tukey <- TukeyHSD(anova)
print(tukey)
# compact letter display
coba = multcompLetters4(anova, tukey)
print(coba)
# creating the compact letter display
tukey.cld <- multcompLetters4(anova, tukey)
print(tukey.cld)
这就是我想要得到的---〉我想要在我的数据
中得到一个字母
请帮帮我
1条答案
按热度按时间ttvkxqim1#
这对你有用吗?我在下面添加了一些注解。
创建于2022年9月5日,使用reprex v2.0.2
species
和species:Strain
的紧凑字母平均值比较。