View source: R/plot_sf_weekly_single.r
plot_sf_weekly_single | R Documentation |
Generate a single plot of seasonal factors by week for a range of weeks
plot_sf_weekly_single( this_sf, this_week, first_week, last_week, forecast = 0, this_range = NULL, this_trans = TRUE )
this_sf |
Numeric vector of seasonal factors. |
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. |
this_trans |
Logical scalar; set to TRUE if the log transformation is used in the decomposition, FALSE otherwise. Default: TRUE |
Generate a plot of seasonal factors by week. User can specify limits for the weeks plotted in order to generate a multi-panel plot.
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_sf_weekly_single(ic_sf, this_week = ic_week, first_week = 1, last_week = 9, forecast = 0, this_range = sf_range, this_trans = FALSE) plot_sf_weekly_single(ic_sf, this_week = ic_week, first_week = 10, last_week = 18, forecast = 0, this_range = sf_range, this_trans = FALSE) plot_sf_weekly_single(ic_sf, this_week = ic_week, first_week = 19, last_week = 27, forecast = 0, this_range = sf_range, this_trans = FALSE) plot_sf_weekly_single(ic_sf, this_week = ic_week, first_week = 28, last_week = 36, forecast = 0, this_range = sf_range, this_trans = FALSE) plot_sf_weekly_single(ic_sf, this_week = ic_week, first_week = 37, last_week = 45, forecast = 0, this_range = sf_range, this_trans = FALSE) plot_sf_weekly_single(ic_sf, this_week = ic_week, first_week = 46, last_week = 53, forecast = 0, this_range = sf_range, this_trans = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.