Plots a bar plot using ggplot2.

bar_plot(
  data,
  variable,
  limits = c(0, 1000),
  title = NULL,
  xlab = NULL,
  ylab = "Count"
)

Arguments

data

The dataset that contains the variable to be plotted

variable

The variable to be plotted

limits

The minimum and maximum y values. By default, y-min set to 0 and y-max set to 1000.

title

The title of the figure. By default set to NULL.

xlab

The x label of the figure. By default set to NULL.

ylab

The y label of the figure. By default set to "Count".