powered by
histogram() draws a histogram with formatted texts and adds a normal curve over the histogram.
histogram()
histogram( data, var, breaks = NULL, xlab = NULL, main = NULL, sub = NULL, labels = TRUE, freq = TRUE, curve = TRUE, ... )
Dataset
variable
hist
logical. If TRUE (default), a normal curve is overlaid over the histogram.
TRUE
If freq is set to FALSE, probability densities, component density, are plotted (so that the histogram has a total area of one). In this case, normal curve will not be generated.
freq
FALSE
# NOT RUN { # histogram(infert, age) # histogram(infert, age, labels = FALSE) # histogram(infert, age, freq = FALSE) # }
Run the code above in your browser using DataLab