make_stat_count_plots: Make a nice-looking stat_count (similar to barplot) plot.

View source: R/graphs.R

make_stat_count_plotsR Documentation

Make a nice-looking stat_count (similar to barplot) plot.

Description

Make a nice-looking stat_count (similar to barplot) plot.

Usage

make_stat_count_plots(
  data,
  column,
  count = TRUE,
  title = NULL,
  ylab = NULL,
  xlab = NULL
)

Arguments

data

A data.frame with the data you want to graph.

column

A string with the name of the column you want to make the plot from.

count

A boolean (default TRUE) indicating if you want the barplot to show a count of the column values or a percent.

title

A string with the text you want as the title.

ylab

A string with the text you want as the y-axis label.

xlab

A string with the text you want as the x-axis label.

Value

A stat_count object

Examples

make_stat_count_plots(mtcars, "mpg")

make_stat_count_plots(mtcars, "mpg", count = FALSE, title = "hello", ylab = "YLAB Label")

jacobkap/crimeutils documentation built on Jan. 1, 2023, 12:20 a.m.