gghistogram

0th

Percentile

Histogram with optional normal and kernel density functions

Plots a histogram and density estimates using ggplot.

Usage
gghistogram(x, add.normal = FALSE, add.kde = FALSE, add.rug = TRUE, bins,
boundary = 0)
Arguments
x

a numerical vector.

Add a normal density function for comparison

Add a kernel density estimate for comparison

Add a rug plot on the horizontal axis

bins

The number of bins to use for the histogram. Selected by default using the Friedman-Diaconis rule given by nclass.FD

boundary

A boundary between two bins.

Not used (for consistency with lag.plot)

Value

None.

hist, geom_histogram

• gghistogram
Examples
# NOT RUN {