Histogram of a Distribution

USAGE:

histogram(formula, data = sys.parent(1), panel = "panel.histogram", 
        type = "percent" , nint = if(is.factor(x)) length(levels(x)) else 
        round(logb(length(x), base=2)+1), endpoints = range(x[!na.x]), 
        ylim = c(0, max(y)), xlim = range(X, endpoints), breaks =  
        if(is.factor(x)) seq(0.5, length = length(levels(x)) + 1) else 
        do.breaks(endpoints, nint), xlab = labs[1], ylab = labs[2],  
        groups = NULL, ...) 

The following arguments have special meaning within this function. The common meanings for these and all other arguments are listed separately under trellis.args.

REQUIRED ARGUMENTS:

formula
a formula in the form: ~ x | g1 * g2 * ... however the given variables g1, g2 , ... may be omitted. The x variable is a numeric response and is the data used to construct each histogram. Variables on the right hand side of the vertical bar are factors or shingles, and are used to parcel the x values out to various panels.

OPTIONAL ARGUMENTS:

breaks
optional vector of the break points for the bars of the histogram
endpoints
The range of x to be binned.
nint
optional recommendation for the number of classes (i.e., bars) the histogram should have.
type
A character string describing the type of histogram plotted: "percent", or "count" .

VALUE:

an object of class trellis, which is automatically plotted by print.trellis.

SEE ALSO:

, , .

EXAMPLES:

histogram( ~ height | voice.part, data = singer, nint = 17,  
          endpoints = c(59.5, 76.5), layout = c(2,4), aspect = 1,  
          xlab = "Height (inches)")