# NOT RUN {
# setup
set.seed(123)
library(ggstatsplot)
# -------------- within-subjects design --------------------------------
library(jmv)
data("bugs", package = "jmv")
# converting to long format
data_bugs <- bugs %>%
tibble::as_tibble(.) %>%
tidyr::gather(., key, value, LDLF:HDHF)
# creating the subtitle
ggstatsplot::subtitle_anova_nonparametric(
data = data_bugs,
x = key,
y = value,
paired = TRUE,
conf.level = 0.99,
k = 2
)
# -------------- between-subjects design --------------------------------
ggstatsplot::subtitle_anova_nonparametric(
data = ggplot2::msleep,
x = vore,
y = sleep_rem,
paired = FALSE,
conf.level = 0.99,
conf.type = "perc"
)
# }
Run the code above in your browser using DataLab