gg_reshist {lindia} | R Documentation |
Generate histogram of residuals in ggplot.
Description
Generate histogram of residuals in ggplot.
Usage
gg_reshist(fitted.lm, bins = NULL)
Arguments
fitted.lm |
a fitted linear model (i.e. lm, glm) that contains fitted regression |
bins |
bin size for histogram |
Value
A ggplot object
Examples
library(MASS)
data(Cars93)
cars_lm <- lm(Price~ Passengers + Length + RPM, data = Cars93)
gg_reshist(cars_lm)
# specify number of bins
gg_reshist(cars_lm, bins = 20)
[Package lindia version 0.10 Index]