Easily generate interaction plots of two nominal grouping variables and a numeric response variable.
tadaa_int(data, response, group1, group2, grid = FALSE, brewer_palette = "Set1", labels = c("A", "B"), show_n = FALSE, print = TRUE)
A data.frame.
data.frame
Response variable.
First grouping variable.
Second grouping variable.
If TRUE, the resulting graphs will be arranged in a grid via cowplot::plot_grid.
TRUE
The name of the RColorBrewer palette to use, defaults to Set1.
RColorBrewer
Set1
Labels used for the plots when printed in a grid (grid = TRUE), defaults to c("A", "B").
grid = TRUE
c("A", "B")
If TRUE, displays N in plot subtitle.
Default is TRUE, set FALSE to suppress automatic printing. Useful if you intend to further modify the outpur plots.
FALSE
Invisible: A list with two ggplot2 objects named p1 and p2. If print = TRUE: Printed: The one or two ggplot2 objects, depending on grid.
p1
p2
print = TRUE
grid
Other Tadaa-plot functions: tadaa_balance, tadaa_mean_ci, tadaa_plot_tukey
tadaa_balance
tadaa_mean_ci
tadaa_plot_tukey
# NOT RUN { tadaa_int(ngo, stunzahl, jahrgang, geschl) # As grid, if cowplot is installed tadaa_int(ngo, stunzahl, jahrgang, geschl, grid = TRUE) # }
Run the code above in your browser using DataCamp Workspace