Can you please guide me how to show only 2 decimal places with p-value, please ?
Which argument here is responsible for it ?
https://indrajeetpatil.github.io/ggstatsplot/articles/web_only/ggbetweenstats.html
In PHolm corrected I would like to round it to two decimal places or no decimal places at all.
How do I do it please ?
We need a reproducible example (reprex)
Why reprex?
Getting unstuck is hard. Your first step here is usually to create a reprex, or reproducible example. The goal of a reprex is to package your code, and information about your problem so that others can run it and feel your pain. Then, hopefully, folks can more easily provide a solution.
What's in a Reproducible Example?
Parts of a reproducible example:
background information - Describe what you are trying to do. What have you already done?
complete set up - include any library() calls and data to reproduce your issue.
data for a reprex: Here's a discussion on setting up data for a reprex
make it run - include the minimal code required to reproduce your error on the data…
A handy way to supply sample data is to use the dput() function. See ?dput. If you have a very large data set then something like head(dput(myfile), 100) will likely supply enough data for us to work with.
The reprex is here:
https://indrajeetpatil.github.io/ggstatsplot/reference/ggbetweenstats.html
Argument k=2L is supposed to work, but it is not (at least for me).
Even a chart on this website has got different numbers of p-value's ( FDR corrected) decimal places displayed.
If you go to the main page there is a similar pattern, this time with PHolm corrected:
https://indrajeetpatil.github.io/ggstatsplot/index.html
Thanks but that is an example. We really need to see your actual code and some of your data.
It probably would not hurt to see the output of
sessionInfo()
Here is the code:
library(ggplot2)
library(RVAideMemoire)
library(ggpubr)
library(ggstatsplot)
iris.table <- iris
ggstatsplot::ggbetweenstats(data = iris.table, x = Species, y = Sepal.Length, plot.type = "box", type = "parametric",
ggsignif.args = list(textsize = 4.5, tip_length = 0.01),
k = 3,
outlier.tagging = FALSE,
mean.plotting = FALSE,
xlab = "Species",
ylab = "Sepal Length",
ggstatsplot.layer = FALSE,
pairwise.comparisons = TRUE,
pairwise.display = "significant", p.adjust.method = "BH",
point.args = list(position = ggplot2::position_jitterdodge(dodge.width = 0.15),
size = 1.5, stroke = 0))+
ggplot2::scale_color_manual(values = c("black", "black", "black"))+
scale_x_discrete(labels = c("Iris setosa", "Iris versicolor", "Iris virginica"))+
theme(text = element_text(size=13),
axis.text.x = element_text(size = 12),
axis.text = element_text(size = 13),
axis.text.y = element_text(size = 12),
plot.caption = element_text(size = 13),
plot.subtitle = element_text(size = 13))
which gives this:
system
Closed
April 17, 2022, 5:58pm
6
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed. If you have a query related to it or one of the replies, start a new topic and refer back with a link.