# NOT RUN {
# this internal function may not have much utility outside of the package
set.seed(123)
library(ggplot2)
# make a plot
p <- ggplot(data = iris, aes(x = Species, y = Sepal.Length)) +
geom_boxplot()
# get a dataframe with means
mean_dat <- ggstatsplot:::mean_labeller(
data = iris,
x = Species,
y = Sepal.Length,
mean.ci = TRUE,
k = 3
)
# add means
ggstatsplot:::mean_ggrepel(
plot = p,
x = Species,
y = Sepal.Length,
mean.data = mean_dat,
mean.color = "darkgreen"
)
# }
Run the code above in your browser using DataLab