plotMeans | R Documentation |
Draws, for a given response variable, a plot of the response means by levels of up to three categorical factors of the design. When the design is balanced, it allows to visualize main effects or interactions for the response of interest. For unbalanced designs, this plot must be used with caution.
plotMeans( Y, design, cols = NULL, x, z = NULL, w = NULL, title = NULL, xlab = NULL, ylab = NULL, color = NULL, shape = NULL, linetype = NULL, size = 2, hline = NULL, theme = theme_bw() )
Y |
A numerical matrix containing the columns to be drawn. |
design |
A nxk "free encoded" experimental design data frame. |
cols |
A vector with either the column name(s) of the Y matrix to plot (character) or the column index position(s). |
x |
A character string giving the |
z |
A character string giving the |
w |
A character string giving the |
title |
Plot title. |
xlab |
If not |
ylab |
If not |
color |
If not |
shape |
If not |
linetype |
If not |
size |
Argument of length 1 giving the points size. |
hline |
If not |
theme |
ggplot theme, see |
A means plot (ggplot).
# 1 factor plotMeans(Y = UCH$outcomes, design = UCH$design, cols = "4.0628702", x = "Hippurate", color = "blue") # 2 factors plotMeans(Y = UCH$outcomes, design = UCH$design, cols = c(364,365), x = "Hippurate", z = "Time", shape = c(15,1)) # 3 factors plotMeans(Y = UCH$outcomes, design = UCH$design, cols = c(364,365), x = "Hippurate", z = "Time", w = "Citrate", linetype = c(3,3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.