-
Notifications
You must be signed in to change notification settings - Fork 165
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
How to change map_signif_level #30
Comments
Hi, In the current version the function stat_compare_means() don't support the argument map_signif_level. I'll work on that. Thanks |
As far as I can tell, the significance symbols are still hard coded into stat_compare_means(). Any movement on this? I'd love to be able to control the asterisks on my graphs. |
After installing the latest developmental version ( df <- ToothGrowth
df$dose <- factor(df$dose)
comparisons <- list(
c("0.5", "1"), c("1", "2"),
c("0.5", "2")
)
symnum.args <- list(
cutpoints = c(0, 0.0001, 0.001, 0.01, 0.05, 1),
symbols = c("xxxx", "***", "**", "*", "ns")
)
ggplot(df, aes(dose, len)) +
geom_boxplot()+
stat_compare_means(
comparisons = comparisons,
label = "p.signif",
symnum.args = symnum.args
) The output should look like this: |
I am trying to change the significance intervals and the associated *s for the output. I thought map_signif_level should do the trick. Am I wrong? Is there a way to do it. I would appreciate any help.
Thanks
JJ
bonferroni_n <- 4828
symnum.args <- list(cutpoints = c(0, 0.05/bonferroni_n, 0.05, 1), symbols = c("***", "*", "ns"))
Output of compare_means works when I try the following
compare_means(len ~ dose, data = ToothGrowth,method="t.test", symnum.args = symnum.args)
I thought the following should work for the stat_compare_means, but it doesnot.
ggboxplot(ToothGrowth, x = "dose", y = "len" ) +
stat_compare_means( comparisons = my_comparisons,
method = "t.test",
label="p.signif",
paired = TRUE,
map_signif_level = c("***"=0.05/bonferroni_n , "**"=0.001, "*"=0.05) )
The text was updated successfully, but these errors were encountered: