A function for creating harmonized line plots with optional errorbars.
line.plot(
parent.df,
category.palette = c("red", "blue"),
linetype.palette = c("dotted", "blank", "solid", "blank"),
line.size = 0.75,
shape.palette = c(24, 21),
x.label = "Visit",
y.label = "Response",
category.label = "Treatment Group",
x.limits = NULL,
x.ticks = NULL,
x.ticks.labels = NULL,
addBars = TRUE,
bar.width = 1,
pdval = 0.25,
x.col = "XVALUES",
y.col = "YVALUES",
y.limits = NULL,
y.ticks = NULL,
category.color = "CATEGORY.COLOR",
category.symbol.col = "CATEGORY.SYMBOL",
y.digits = 0,
ymin.col = "YMIN",
ymax.col = "YMAX",
linetype.col = "LTYPE"
)
A ggplot object is returned.
data.frame used by ggplot
colors assoicated with categorical variable
values passed to scale_linetype_manual
value gets passed to size within geom_line, geom_step
values passed to scale_shape_manual
value gets passed to labs
value gets passed to labs
passed to x-axis label
value gets passed to scale_x_continuous
value gets passed to scale_x_continuous
passed to scale_x_continuous
logical to add error bars (line.plot)
used by line.plot
value passed to position_dodge (lineplot)
parent.df column associated with response vairable (line.plot, nsubj.plot)
parent.df column associated with response vairable
passed to scale_y_continuous
passed to scale_y_continuous
data.frame column assocated with aes color mapping (forest.plot, line.plot, nsubj.plot, table.plot)
used by line.plot
passed to scale_y_continuous label's, fmt (box.plot, line.plot)
name of parent.df column associated with ymin (line.plot errorbars)
name of parent.df column associated with ymax (line.plot errorbars)
name of parent.df column associated with linetype
Greg Cicconetti/David Wade