powered by
Histogram with density curves super-imposed
histNorm(x, data, normCurve=TRUE, densCurve=FALSE, bins=30)
Character string giving the name of the variable to be plotted
A data frame in which x can be found.
x
Whether or not to impose a normal curve with same mean and SD as plotted variable (solid line).
Whether or not to impose a smoothe density estimate of the plotted variable (dashed line).
Number of bins to use in the histogram
A ggplot
ggplot
# NOT RUN { data(alberta) alberta$age <- ifelse(alberta$age > 94, NA, alberta$age) histNorm("age", alberta) # }
Run the code above in your browser using DataLab