Learn R Programming

agricolae (version 1.0-4)

normal.freq: Normal curve on the histogram

Description

A normal distribution graph elaborated from the histogram previously constructed. The average and variance are obtained from the data grouped in the histogram.

Usage

normal.freq(histogram, probability = FALSE, ...)

Arguments

histogram
object constructed by the function hist
probability
when histogram is by density
...
Other parameters of the function hist

Value

  • Histogramobject
  • probabilitylogic False or True

See Also

polygon.freq, table.freq, stat.freq, intervals.freq, sturges.freq, join.freq, ojiva.freq, graph.freq

Examples

Run this code
library(agricolae)
data(growth)
attach(growth)
#startgraph
h1<-hist(height,col="green",xlim=c(8,14))
normal.freq(h1,col="blue")
#endgraph
#startgraph
h2<-hist(height,col="yellow",xlim=c(8,14),probability=TRUE)
normal.freq(h2,probability=TRUE)
#endgraph

Run the code above in your browser using DataLab