doHist | R Documentation |
Plot a histogram with the median, first quartile, and third quartile reported.
doHist(
data,
var,
xlab = var,
title = NULL,
show.title = TRUE,
br = ceiling(sqrt(nrow(data))),
digits = 3,
score.lab = "scorable",
...
)
data |
data.frame with column names |
var |
string of variable in |
xlab |
x-axis label |
title |
histogram title |
show.title |
logical. If |
br |
breaks in histogram. By default, the number of bins is taking as
the ceiling of the square root of the number of rows in |
digits |
number of digits to round for median, Q1, Q3 |
score.lab |
label for non-missing cases |
... |
additional arguments to |
Expects missing to be NA
. Do not filter out missing data
as this function reports missing data counts.
A histogram with some annotated values.
Samuel Leung, Derek Chiu
doHist(mtcars, "mpg")
doHist(mtcars, "mpg", "MPG")
doHist(mtcars, "mpg", title = "Distribution of MPG")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.