Description Usage Arguments Examples
View source: R/basic.R
Fancy Histogram
1 2 3 4
histf(x, breaks = sqrt(length(x)), length.out = 100, rug = FALSE, boxplot = FALSE, fill = "lightblue", main = paste("Histogram of", xname), densityFunction = function(y) dnorm(y, mean(x), sd(x)), densityName = "normal", xrange = extendrange(c(min(x), max(x))), ...)
x
a numeric vector
breaks
see hist
1 2 3 4 5 6 7
with(subset(hweight, gender=="M"), histf(height)) with(subset(hweight, gender=="M"), { hist(height, probability=TRUE, breaks=sqrt(length(height)), col="lightblue") lines(density(height)) xs <- seq(min(height), max(height), length.out=100) lines(xs, dnorm(xs)) })
Add the following code to your website.
REMOVE THIS Copy to clipboard
For more information on customizing the embed code, read Embedding Snippets.