Learn R Programming

multiUS (version 1.2.3)

histNorm: Histogram with normal curve

Description

The function draws a histogram with a normal density curve. The parameters (mean and standard deviation) are estimated on the empirical data.

Usage

histNorm(y, breaks = "Sturges", freq = TRUE, ...)

Value

A list with two elements:

Arguments

y

A vector of observations.

breaks

See help file for function hist.

freq

Wheter frequencies (freq = TRUE) of density (freq = FALSE) should be represented on \(y\)-axis.

...

Arguments passed to function hist.

Author

Marjan Cugmas

Examples

Run this code
histNorm(rnorm(1000), freq = TRUE)
histNorm(rnorm(1000), freq = FALSE)

Run the code above in your browser using DataLab