R/graphs.R
make_stat_count_plots.Rd
Make a nice-looking stat_count (similar to barplot) plot.
make_stat_count_plots(
data,
column,
count = TRUE,
title = NULL,
ylab = NULL,
xlab = NULL
)
A data.frame with the data you want to graph.
A string with the name of the column you want to make the plot from.
A boolean (default TRUE) indicating if you want the barplot to show a count of the column values or a percent.
A string with the text you want as the title.
A string with the text you want as the y-axis label.
A string with the text you want as the x-axis label.
A stat_count object
make_stat_count_plots(mtcars, "mpg")
make_stat_count_plots(mtcars, "mpg", count = FALSE, title = "hello", ylab = "YLAB Label")