Learn R Programming

dotwhisker (version 0.2.0.5)

relabel_y_axis: Relabel the Y-Axis of a Dot-Whisker Plot

Description

relabel_y_axis is a convenience function for relabeling the predictors on the y-axis of a dot-whisker plot created by dwplot

Usage

relabel_y_axis(x)

Arguments

x
A vector of labels for predictors, listed from top to bottom

See Also

relabel_predictors to relabel the predictors in a tidy data.frame before using dwplot

Examples

Run this code
data(mtcars)
m1 <- lm(mpg ~ wt + cyl + disp, data = mtcars)
dwplot(m1) + relabel_y_axis(c("Intercept", "Weight", "Cylinders", "Displacement"))

Run the code above in your browser using DataLab