histNorm: Histogram with Density Curves Super-imposed

Description Usage Arguments Value Examples

View source: R/4419_functions.r

Description

Histogram with density curves super-imposed

Usage

1
histNorm(x, data, normCurve=TRUE, densCurve=FALSE, bins=30)

Arguments

x

Character string giving the name of the variable to be plotted

data

A data frame in which x can be found.

normCurve

Whether or not to impose a normal curve with same mean and SD as plotted variable (solid line).

densCurve

Whether or not to impose a smoothe density estimate of the plotted variable (dashed line).

bins

Number of bins to use in the histogram

Value

A ggplot

Examples

1
2
3
data(alberta)
alberta$age <- ifelse(alberta$age > 94, NA, alberta$age)
histNorm("age", alberta)

davidaarmstrong/uwo4419 documentation built on Sept. 22, 2020, 3:32 p.m.