Learn R Programming

rapport (version 0.51)

rp.hist: Histogram

Description

This function is a wrapper around histogram which operates only on numeric vectors with optional facet.

Usage

rp.hist(x, facet = NULL, data = NULL,
    kernel.smooth = FALSE, ...)

Arguments

x
a numeric variable
facet
an optional categorical variable to make facets by
data
an optional data frame from which the variables should be taken
kernel.smooth
add kernel density plot?
...
additional parameters to histogram

Examples

Run this code
rp.hist(ius2008$edu)
rp.hist(ius2008$edu, facet=ius2008$gender)
rp.hist(ius2008$edu, ius2008$dwell)
rp.hist(ius2008$edu, kernel.smooth=TRUE)
with(ius2008, rp.hist(edu, facet = gender))
rp.hist(edu, data = ius2008)
rp.hist(edu, gender, ius2008)

Run the code above in your browser using DataLab