View source: R/plotDensityHistogram.r
plotDensityHistogram | R Documentation |
Produces a histogram for a vector of values and adds a density curve of the distribution.
plotDensityHistogram(
x,
prob = FALSE,
col = "gray",
main = "",
linecol = "black",
lwd = 2,
adjust = 1,
bw = "nrd0",
kernel = "gaussian",
...
)
x |
A vector of values. |
prob |
If |
col |
The color of the histogram bars. |
main |
The title displayed for the plot. |
linecol |
The color of the line in the plot. |
lwd |
The width of the line in the plot. |
adjust |
Passed to |
bw |
Passed to |
kernel |
Passed to |
... |
Other arguments passed to |
The function relies on the hist
function. The density curve
relies on the density
function.
Produces a plot. Returns nothing.
Salvatore Mangiafico, mangiafico@njaes.rutgers.edu
https://rcompanion.org/handbook/C_04.html
plotNormalHistogram
,
plotNormalDensity
### Plot of residuals from a model fit with lm
data(Catbus)
model = lm(Steps ~ Gender + Teacher,
data = Catbus)
plotDensityHistogram(residuals(model))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.