From 4a8f099316ffeadb2caffab090aa4b7cf51643a3 Mon Sep 17 00:00:00 2001 From: JJ Chen Date: Mon, 29 May 2023 10:32:29 -0400 Subject: [PATCH] Update graphics.R Updated documentation for 'period' parameter in `gg_season` function, adding clarity on usage and providing examples. --- R/graphics.R | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/R/graphics.R b/R/graphics.R index 3e8d6895..e26524a9 100644 --- a/R/graphics.R +++ b/R/graphics.R @@ -179,7 +179,14 @@ guess_plot_var <- function(x, y){ #' @param data A tidy time series object (tsibble) #' @param y The variable to plot (a bare expression). If NULL, it will #' automatically selected from the data. -#' @param period The seasonal period to display. +#' @param period The seasonal period to display. If NULL (default), +#' the largest frequency in the data is used. If numeric, it represents +#' the frequency times the interval between observations. If a string +#' (e.g., "1y" for 1 year, "3m" for 3 months, "1d" for 1 day, +#' "1h" for 1 hour, "1min" for 1 minute, "1s" for 1 second), +#' it's converted to a Period class object from the lubridate package. +#' Note that the data must have at least one observation per seasonal period, +#' and the period cannot be smaller than the observation interval. #' @param facet_period A secondary seasonal period to facet by #' (typically smaller than period). #' @param max_col The maximum number of colours to display on the plot. If the