A function to create tables to accompany KMs and lineplots
nsubj.plot(
parent.df,
category.palette = c("red", "blue"),
x.label = "Number of Subjects",
y.label = "Treatment\nGroup",
text.size = 4,
x.col = "XVALUES",
text.col = "N",
category.color = "CATEGORY",
x.limits = c(0.5, 18),
x.ticks = unique(parent.df$XVALUES),
x.ticks.labels = unique(parent.df$XVALUES)
)
A ggplot object is returned.
data.frame used by ggplot
colors assoicated with categorical variable
value gets passed to labs
value gets passed to labs
value gets passed to geom_text
parent.df column associated with response vairable (line.plot, nsubj.plot)
used by nsubj.plot
data.frame column assocated with aes color mapping (forest.plot, line.plot, nsubj.plot, table.plot)
value gets passed to scale_x_continuous
value gets passed to scale_x_continuous
passed to scale_x_continuous
Greg Cicconetti/David Wade