Learn R Programming

adas.utils (version 1.1.1)

ggTukey.TukeyHSD: ggTukey for TukeyHSD

Description

Plot Tukey's HSD test via GGplot2.

Usage

# S3 method for TukeyHSD
ggTukey(obj, which = 1, ...)

Value

a GGPlot2 object

Arguments

obj

a TukeyHSD object

which

the index of the comparison. Used when the formula in the undelying aov call has more than one term.

...

further parameters (currently unused)

See Also

TukeyHSD() ggTukey.data.frame() ggTukey.TukeyHSD()]]

Examples

Run this code
library(tidyverse)
examples_url("battery.dat") %>%
  read_table() %>%
  mutate(across(c(Temperature, Material), factor)) %>%
  filter(Temperature==15) %>%
  aov(Response~Material, data=.) %>%
  TukeyHSD() %>%
  ggTukey()

Run the code above in your browser using DataLab