if (FALSE) { # requireNamespace("PMCMRplus", quietly = TRUE)
# \donttest{
set.seed(123)
# non-grouped function -----------------------------
p <- ggbetweenstats(mtcars, cyl, mpg)
extract_stats(p)
# the exact details depend on the function
ggbarstats(mtcars, cyl, am) %>% extract_stats()
# grouped function -----------------------------
p <- grouped_ggbarstats(
Titanic_full,
x = Survived,
y = Sex,
grouping.var = Age
)
extract_stats(p[[1L]])
extract_stats(p[[2L]])
# }
}
Run the code above in your browser using DataLab