Learn R Programming

adas.utils (version 1.1.1)

ggTukey.data.frame: ggTukey for data.frame

Description

ggTukey for data.frame

Usage

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

Value

a GGPlot2 object

Arguments

obj

a data frame

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.

splt

a formula to split the data frame

...

further parameters passed to TukeyHSD

Examples

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

Run the code above in your browser using DataLab