Learn R Programming

RVAideMemoire (version 0.9-35)

byf.normhist: Histogram and normal distribution for factor levels

Description

Draw on the same histogram of a numeric variable a histogram per level of a factor, and add the normal distribution line of each level.

Usage

byf.normhist(formula, data)

Arguments

formula
a formula of the form a ~ b where a gives the data values and b a factor giving the corresponding groups.
data
an optional data frame containing the variables in the formula formula. By default the variables are taken from environment(formula).

Examples

Run this code
data(iris)
byf.normhist(Sepal.Length~Species,data=iris)

Run the code above in your browser using DataLab