plot_boxplot_single: Generate one set of weekly boxplots

View source: R/plot_boxplot_single.r

plot_boxplot_singleR Documentation

Generate one set of weekly boxplots

Description

Generate a single set of boxplots of factors by week for a range of weeks

Usage

plot_boxplot_single(
  this_factor,
  this_week,
  first_week,
  last_week,
  forecast = 0,
  this_range = NULL
)

Arguments

this_factor

Numeric vector of factors from weekly seasonal adjustment.

this_week

Numeric vector; Week of the year to match.

first_week

Numeric scalar; First week to be included in the plot.

last_week

Numeric scalar; Last week to be included in the plot.

forecast

Numeric scalar; Number of forecasts. Default: 0.

this_range

Numeric scalar; Range of the seasonal factors to be plotted. Default: range taken from the observations being plotted.

Value

Generate a plot of seasonal factors by week. User can specify limits for the weeks plotted in order to generate a multi-panel plot.

Examples

par(mfrow = c(3, 2), mar = c(3.1, 2.1, 0.5, 0.5), oma = c(0, 0, 3, 0))
sf_range <- range(ic_sf)
plot_boxplot_single(ic_sf, ic_week,  1,  9, this_range = sf_range)
plot_boxplot_single(ic_sf, ic_week, 10, 18, this_range = sf_range)
plot_boxplot_single(ic_sf, ic_week, 19, 27, this_range = sf_range)
plot_boxplot_single(ic_sf, ic_week, 28, 36, this_range = sf_range)
plot_boxplot_single(ic_sf, ic_week, 37, 45, this_range = sf_range)
plot_boxplot_single(ic_sf, ic_week, 46, 53, this_range = sf_range)

bcmonsell/airutilities documentation built on May 16, 2022, 3:23 p.m.