Entering edit mode

14 days ago

Ghada
•
0

Hi,

I need help to improve the stat on this plot. First, I am not sure how to move the Kruskal-wallis above the others pvalue. Then, I want to add line below the kruskal-wallis test?

I used this code to generate:

```
gv_interest = ggboxplot(dat_viogenes, x = "Condition",
y = colnames(dat_viogenes)[1:19],
combine = T,
fill="Condition") +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
stat_compare_means(comparisons = my_comparisons,method = "wilcox.test",
label.y = 2.5,
method.args = list(alternative="greater"))+
stat_compare_means(method = "kruskal.test", label.y = 2, size= 5, hjust= 0.09)
gv_interest
```

Any help would be much appreciated and thanks in advance

Great. thats work. Do you know how can I remove the kruskall-Wallis name from the plot? Also I would like to draw a line under the kruskall-Wallis P value? Is it possible to use symbol instead of p value ? Thanks very much for your help

To remove "Kruskall Wallis" you can try adding the argument label="p" or label = "p.signif" which displays the p-value or *** like this:

stat_compare_means(method = "kruskal.test", size = 5, hjust = 0.09, label = "p.signif")

Thanks. Thats work