powered by
Histogram with overlaid normal curve or density, optionally with rug
Histr(x, overlay="normal", rug=FALSE, col="gray80", ...)
numerical vector
type of curve to overlay, accepted values are "normal" and "density"
if TRUE, will add rug plot
curve color
arguments to 'hist()'
Histr plots histogram with overlaid normal curve or density, optionally with rug. Modified from Stephen Turner's 'Tmisc' package.
hist, density, rnorm
hist
density
rnorm
# NOT RUN { x <- rnorm(1000, mean=5, sd=2) Histr(x) Histr(x, overlay="density") Histr(x^2, overlay="density", rug=TRUE, breaks=50, col="lightblue2") # }
Run the code above in your browser using DataLab