plotNormalHistogram.RdProduces a histogram for a vector of values and adds a normal curve with the same mean and standard deviation. The plot can be used to quickly compare the distribution of data to a normal distribution.
plotNormalHistogram(
x,
prob = FALSE,
col = "gray",
main = "",
linecol = "blue",
lwd = 2,
length = 1000,
...
)A vector of values.
If FALSE, then counts are displayed in the histogram.
If TRUE, then the density is shown.
The color of the histogram bars.
The title displayed for the plot.
The color of the line in the plot.
The width of the line in the plot.
The number of points in the line in the plot.
Other arguments passed to hist.
Produces a plot. Returns nothing.
The function relies on the hist function. The normal curve
has the same mean and standard deviation as the values in the
vector.