grouped_ggwithinstats | R Documentation |
A combined plot of comparison plot created for levels of a grouping variable.
grouped_ggwithinstats( data, ..., grouping.var, output = "plot", plotgrid.args = list(), annotation.args = list() )
data |
A data frame (or a tibble) from which variables specified are to
be taken. Other data types (e.g., matrix,table, array, etc.) will not
be accepted. Additionally, grouped data frames from |
... |
Arguments passed on to
|
grouping.var |
A single grouping variable. |
output |
Character that describes what is to be returned: can be
|
plotgrid.args |
A |
annotation.args |
A |
ggwithinstats
, ggbetweenstats
,
grouped_ggbetweenstats
if (require("PMCMRplus")) { # to get reproducible results from bootstrapping set.seed(123) library(ggstatsplot) library(dplyr, warn.conflicts = FALSE) library(ggplot2) # the most basic function call grouped_ggwithinstats( data = filter(bugs_long, condition %in% c("HDHF", "HDLF")), x = condition, y = desire, grouping.var = gender, type = "np", # non-parametric test # additional modifications for **each** plot using `{ggplot2}` functions ggplot.component = scale_y_continuous(breaks = seq(0, 10, 1), limits = c(0, 10)) ) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.