ggstatsplot
ggstatsplot copied to clipboard
Turning off scientific notation
In this new version 0.9.4 is there finally a possibility to turn off scientific notation in plots and round p-values to the desired level of decimal places ?
It would be good to know if this is possible to achieve as of current version. I tried passing scipen = 999L
to the ggbetweenstats()
function and setting options(scipen = 999L)
globally and both of these don't work.
This would indeed be awesome! Is there a temporary workaround for this?
Is it finally fixed ?
Is it finally fixed ?
There still seems to be no way to turn it off, and I would also like to ask how to stop scientific notation and keep up to a specific number of decimal places.
Next time, it would help for someone to actually include a reproducible example so that I can work off of it.
Anyway, it's not easy to display numbers in expressions in a way that would keep the expression succinct and still cover all possible values that can potentially be displayed (from -Inf
to Inf
). This is why whether the numbers are displayed in scientific notation or not depends on the number of rounding digits chosen and how small/big the value is. This is currently controlled in {ggstatsplot}
by (the terribly named) k
parameter.
Default: scientific notation
set.seed(123)
library(ggstatsplot)
library(WRS2)
ggwithinstats(
WineTasting,
Wine,
Taste,
paired = TRUE,
k = 2L # default
)
Changing default: No scientific notation
ggwithinstats(
WineTasting,
Wine,
Taste,
paired = TRUE,
k = 4L
)
Created on 2024-03-17 with reprex v2.1.0