cdf.plot {figuRes2} | R Documentation |
cdf.plot
Description
A function for creating harmonized ggplot2 cumulative distribution plots. Statistics computed by stat_ecdf().
Usage
cdf.plot(
parent.df,
category.col,
category.label,
response.col,
x.label = "",
x.limits = NULL,
x.ticks = NULL,
y.label = "",
y.limits = c(0, 1),
y.ticks = seq(0, 1, 0.2),
line.size = 0.75,
category.palette = c("red", "blue")
)
Arguments
parent.df |
data.frame used by ggplot |
category.col |
data.frame column associated with categorical variable (bar.plot, box.plot, cdf.plot, dot.plot, km.plot) |
category.label |
passed to x-axis label |
response.col |
used by cdf.plottttt |
x.label |
value gets passed to labs |
x.limits |
value gets passed to scale_x_continuous |
x.ticks |
value gets passed to scale_x_continuous |
y.label |
value gets passed to labs |
y.limits |
passed to scale_y_continuous |
y.ticks |
passed to scale_y_continuous |
line.size |
value gets passed to size within geom_line, geom_step |
category.palette |
colors assoicated with categorical variable |
Value
A ggplot object is returned.
Author(s)
Greg Cicconetti
Examples
{
data(demog.data)
cdf.plot(parent.df= demog.data,
category.col = "SEX",
category.label = "Gender",
response.col = "BMI",
x.label = expression(paste("BMI (m/kg",phantom()^2,")")),
x.limits=c(0,60),
x.ticks=seq(0,60,5),
y.label = "Percentage of Subjects",
y.limits= c(0,1),
y.ticks = seq(0,1,.2),
line.size =.75,
category.palette =c("red", "blue")
)
}
[Package figuRes2 version 1.0.0 Index]