plot_geom_bar_by_facility_over_time: Create facets with bar plots over time

View source: R/plots.R

plot_geom_bar_by_facility_over_timeR Documentation

Create facets with bar plots over time

Description

plot_geom_bar_by_facility_over_time() creates an image that contains facets with bar plots over time.

Usage

plot_geom_bar_by_facility_over_time(
  df,
  facility_col,
  date_col,
  date_lbl,
  date_break_str,
  date_format,
  start_date,
  end_date,
  max_val = NULL,
  fill_col = "",
  n_facet_per_row = 5,
  text_size = 7
)

Arguments

df

Data frame to use for the plot.

facility_col

Column name in data frame 'df'.

date_col

Column name in data frame 'df', should contain dates.

date_lbl

String that contains the x-axis label for the plot.

date_break_str

A string giving the distance between date breaks like "2 weeks", or "10 years".

date_format

A string giving the date formatting specification for the date labels (for instance '%b%y').

start_date

Minimal value in the date range

end_date

Maximal value in the date range

max_val

Maximal limit for the y-axis (optional, default 'NULL')

fill_col

Column name in data frame 'df'(optional, default empty string "").

n_facet_per_row

Numeric value (optional, default 5) to set the number of facets per rows.

text_size

Numeric value (optional, default 7) to scale the text size.

Value

This function returns a ggplot2 object.


Thaliehln/timci documentation built on April 8, 2024, 3:38 p.m.