Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specifying Alternative for stat_compare_means #41

Closed
Nicktz opened this issue Oct 4, 2017 · 1 comment
Closed

Specifying Alternative for stat_compare_means #41

Nicktz opened this issue Oct 4, 2017 · 1 comment

Comments

@Nicktz
Copy link

Nicktz commented Oct 4, 2017

Hi,

Great package.

When using stat_compare_means , I cannot find a way of specifying the alternative for the wilcox.test (e.g. setting alternative = "less").

Is this possible using the function? It seems like a core parameter for a graphical function of this sort to be used extensively.

Thanks and regards

Nico

@kassambara
Copy link
Owner

New argument method.args added to stat_compare_means(). A list of additional arguments used for the test method. For example one might use method.args = list(alternative = "greater") for wilcoxon test

library("ggpubr")
data(ToothGrowth)

df3 <- ToothGrowth
ggboxplot(df3, x = "dose", y = "len")+
  stat_compare_means(ref.group = "0.5", 
                     method = "wilcox.test",
                     method.args = list(alternative = "less"))

rplot18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants