FunTukeyHSD | R Documentation |
plot boxplots with compact letter display of pairwise comparisons
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"
)
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() |
boxplot with cld
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"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.