0

When I specify the first x condition as the ref.group, all subsequent conditions are labelled as sig. or ns.

However, when I specify any other condition, only conditions that come after are labelled. For example, if I specify the last condition ref.group="6.5-0524", none of the preceding points are labelled as sig. or ns.

In ggplot2:

p7 <- ggplot(data, aes(x=condition, y=count)) +
  geom_point(position=position_jitter(width=.1,height=0), shape=16, size=2, alpha=7/10, color="forestgreen") +
  stat_compare_means(label = "p.signif", method = "wilcox.test", ref.group = "6.5-0524" ) +
  scale_x_discrete(breaks=c("0-0510","1-0524","2-0510","5.5-0510","6.5-0510","6.5-0524"), labels=c("0","1","2","5.5","6.5-A","6.5-B"))
James
  • 67
  • 4
  • What does your data actually look like? It's hard to troubleshoot in the dark. Please see here: https://stackoverflow.com/help/mcve & https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example – Z.Lin Aug 24 '17 at 04:51
  • I think it does this with any dataset. Does the reference have to be first in the plot? – James Aug 24 '17 at 18:51

1 Answers1

1

It was a bug. Developer has fixed issue and installing latest version works:

if(!require(devtools)) install.packages("devtools")
devtools::install_github("kassambara/ggpubr")
James
  • 67
  • 4