我在制作基因表达差异箱线图时使用ggboxplot函数画图
代码为:
ggplot(data,aes(Group,`CCDC43`))+
geom_boxplot(aes(fill=Group),cex=1.2)+
#scale_fill_manual(values = c('#00BFFF','#FF0000'))+
geom_boxplot(width=0.1,cex=1.2)+
geom_signif(comparisons = list(c("Normal", "Tumor")),
test = t.test,
textsize = 6,map_signif_level = function(p) sprintf("P = %.1e", p)
) +
theme_classic(base_size = 20)+
theme(axis.text = element_text(color = 'black'),
legend.position = 'none')
然后就报错出现:
Warning message:
Computation failed in stat_signif()
Caused by error in if (scales$x$map(comp[1]) == data$group[1] | manual) ...
:
! missing value where TRUE/FALSE needed
出来的结果图是
你把代码文件发给我,我运行修改一下
怎么解决的楼主,我也是一样的报错