library(ggplot2)#加载ggplot2包
library(ggsignif)#加载显著性包
setwd('d:')#设置工作路径
read.table('ahga.txt',header = TRUE,sep = '\t',stringsAsFactors = T)#读取文件,保持标题,保持因素型变量
head(da)#展示前几行数据
compire<-list(c('A','B'),c('A','C'),c('B','C'))#添加要进行多重比较的数据列
ggplot(da,aes(x=Genotype,y=VLCFA,fill=Genotype))+geom_boxplot()+geom_signif(comparisons = compire,step_increase=0.5,map_signif_level = T,test = wilcox.test)#画箱图,并根据t检验结果,添加显著性

相关文章:

  • 2021-05-25
  • 2022-12-23
  • 2021-06-15
  • 2021-06-27
  • 2021-05-12
  • 2021-10-12
  • 2021-06-06
  • 2022-12-23
猜你喜欢
  • 2021-06-05
  • 2021-06-29
  • 2022-12-23
  • 2021-09-11
  • 2022-12-23
  • 2022-12-23
  • 2021-12-31
相关资源
相似解决方案