ggpubr icon indicating copy to clipboard operation
ggpubr copied to clipboard

Adding statistical values to my graph = Computation failed in `stat_signif()`: missing value where TRUE/FALSE needed

Open miguensblanco opened this issue 4 years ago • 2 comments

Hi and thanks for this great package.

I am able to get the statistical analysis of my 3 diffefrent groups (global p value as in the graph attached) but when I try to perform pairwise comparation between the different groups is when I get: Computation failed in stat_signif(): missing value where TRUE/FALSE needed

Shannon_Kruskal-Wallis

The code I am using:

my_comparisons <- list( c("T2_NAFLD", "T2DM"), c("T2_NAFLD_stiffness", "T2_NAFLD"), c("T2DM", "T2_NAFLD_stiffness") )

p1 <- ggviolin(ps1.meta, x = "Groups", y = "Shannon",
               add = "boxplot",add.params = list(fill = "white") , fill = "Groups", palette = c("#00AFBB", "#E7B800", "#FC4E07")) 

p2 <- p1 + stat_compare_means(comparisons = my_comparisons) + stat_compare_means(label.y = 7) 

print(p2)

I'd appreciate any tip in this particular dates :))

Best,

JMB

miguensblanco avatar Dec 21 '20 22:12 miguensblanco

@miguensblanco Hi, were you able to solve this issue? I am getting the same error. Thanks

pdhrati02 avatar Nov 19 '21 12:11 pdhrati02