ggTukey.data.frame: ggTukey for data.frame

ggTukey.data.frameR Documentation

ggTukey for data.frame

Description

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().

Usage

## S3 method for class 'data.frame'
ggTukey(obj, formula, which = 1, .by = NULL, splt = NULL, ...)

Arguments

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

<tidy-select> optional selection of columns to group by for just this call, as an alternative to dplyr::group_by()

splt

Deprecated: a one-sided formula to split the data frame; use .by or dplyr::group_by() instead

...

further parameters passed to TukeyHSD (e.g. conf.level)

Value

a GGPlot2 object

See Also

geom_tukey()

Examples

library(tidyverse)
battery %>%
  ggTukey(Response~Material, .by=Temperature, conf.level=0.99)

battery %>%
  group_by(Temperature) %>%
  ggTukey(Response~Material)

adas.utils documentation built on Nov. 12, 2026, 5:07 p.m.