FunTukeyHSD: boxplots with cld

View source: R/FunTukeyHSD.R

FunTukeyHSDR Documentation

boxplots with cld

Description

plot boxplots with compact letter display of pairwise comparisons

Usage

FunTukeyHSD(
  mod = y ~ x,
  data = dat,
  upp_mar = 4,
  col = NA,
  ylab = "",
  xlab = "",
  main = "",
  las = 3,
  add_legend = F,
  legend_pos = "topright",
  legend = NULL,
  fill = "white"
)

Arguments

mod

model passed to aov() with value ~ factor

data

data.frame with the variables

upp_mar

specify the number of lines on the top of the plot. If there are many letters extra space is necessary

col

vector with color to fill the boxes of the boxplot

ylab

y axis title

xlab

x axis title

main

main title

add_legend

logical if a legend should be add

legend_pos

position specified as character (right, topleft,...)

legend

string vector of length ≥ 1 to appear in the legend

fill

vector with color to fill boxes in legend

orientation

of axis labels see par()

Value

boxplot with cld

Examples

df <- data.frame(x = c(rnorm(80, 10,2), rnorm(20, 7, 2)),
myfac = c(rep(c("a","b", "c", "d"), 20), rep("e", 20)))
FunTukeyHSD(mod = x ~ myfac, data = df, upp_mar = 5, col = c(rep("red", 3), "blue", "blue"),
            ylab = "y axis", las = 2, add_legend = T, legend = c("treatment", "control"),
            fill = c("blue", "red"))

retodomax/FunRZ documentation built on July 30, 2023, 6:42 p.m.