sr_plot_bar: Bar chart

sr_plot_barR Documentation

Bar chart

Description

Produces a highcharts bar chart. Since the data, axis, and grouping variables are parameters in the function, this function will work with any data. Use sr_plot_grouped_bar() for grouped bar chart.

Usage

sr_plot_bar(
  .data,
  x_col,
  y_col,
  plt_title = NULL,
  x_var_title = NULL,
  y_var_title = NULL,
  y_percentage = FALSE
)

Arguments

.data

The data frame to plot.

x_col

The column name, as a string, of the plot's x-axis. Generally, this will be a time variable such as years.

y_col

The column name, as a string, of the y-axis. If this column is a percentage, it should be as a whole number (78.8) and not a decimal (.788).

plt_title

The plot title, as a string.

x_var_title

The x-axis title, as a string.

y_var_title

The y-axis title, as a string.

y_percentage

Boolean, signifying whether the y-axis is a percentage. Defaults to FALSE.


shanejorr/schoolreportr documentation built on Aug. 7, 2023, 12:25 p.m.