Histr: Histogram with overlaid curve

View source: R/aaa.r

HistrR Documentation

Histogram with overlaid curve

Description

Histogram with overlaid normal curve or density, optionally with rug

Usage

Histr(x, overlay="normal", rug=FALSE, col="gray80", ...)

Arguments

x

numerical vector

overlay

type of curve to overlay, accepted values are "normal" and "density"

rug

if TRUE, will add rug plot

col

curve color

...

arguments to 'hist()'

Details

Histr() plots histogram with overlaid normal curve or density, optionally with rug. Based on analogous function from Stephen Turner's 'Tmisc' package.

Author(s)

Alexey Shipunov

See Also

hist, density, rnorm

Examples

x <- rnorm(1000, mean=5, sd=2)
Histr(x)
Histr(x, overlay="density")
Histr(x^2, overlay="density", rug=TRUE, breaks=50, col="lightblue2")

shipunov documentation built on Feb. 16, 2023, 9:05 p.m.

Related to Histr in shipunov...