Plot Box Plot
iidda_plot_box.Rd
Add a box plot to an exiting ggplot plot object. Graphical choices were made to closely reflect plots generated with `LBoM::monthly_box_plot`.
Usage
iidda_plot_box(
plot_object,
data = NULL,
series_variable = "deaths",
time_unit = "week",
...
)
Arguments
- plot_object
a `ggplot2` plot object
- data
data frame containing data prepped for box plotting, typically output from `iidda_prep_box()`. If `NULL` data is inherited from `plot_object`
- series_variable
column name of series variable in `data`, default is "deaths"
- time_unit
time unit to display box plots on the x-axis. Defaults to "week", should be able to handle any time_unit from iidda.analysis:::time_units.
- ...
other arguments to be passed to `scale_x_discrete`