| ggTukey.data.frame | R Documentation |
Runs aov() + TukeyHSD() on the data frame and plots the result. Like
dplyr::summarise(), the data can be split into multiple series either by
passing a grouped tibble (see dplyr::group_by()) or with the .by
argument. The first grouping variable is mapped to colour; any further
grouping variables are mapped to facets via ggplot2::facet_wrap().
## S3 method for class 'data.frame'
ggTukey(obj, formula, which = 1, .by = NULL, splt = NULL, ...)
obj |
a data frame, possibly grouped |
formula |
a formula to be used in the aov call |
which |
the index of the comparison. Used when the formula in the undelying aov call has more than one term. |
.by |
< |
splt |
Deprecated: a one-sided formula to split the data frame; use
|
... |
further parameters passed to |
a GGPlot2 object
geom_tukey()
library(tidyverse)
battery %>%
ggTukey(Response~Material, .by=Temperature, conf.level=0.99)
battery %>%
group_by(Temperature) %>%
ggTukey(Response~Material)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.