R/components.R

Defines functions stl_components

Documented in stl_components

#' STL decomposition components
#' @inheritDotParams stl
#' @return Decomposition table (\code{\link[fabletools]{dable}}) comprising
#'   trend, season and remainder.
#' @export
#' @examplesIf requireNamespace("tsibble", quietly = TRUE)
#' tsibble::as_tsibble(USAccDeaths) %>%
#'   isaiahr::stl_components("value") %>%
#'   fabletools::autoplot()
stl_components <- function(...) {
  stl(...) %>% fabletools::components()
}
royratcliffe/isaiahr documentation built on Feb. 7, 2022, 12:47 a.m.