View source: R/btools_time_series.r
sa | R Documentation |
Get seasonally adjusted values for a vector
sa(value, freq, s.window=9)
value |
The vector to operate on. |
freq |
Frequency of the time series (e.g., 1, 4, 12) |
s.window |
Window parameter that is passed to stats::stl default=9 |
Seasonally adjusted version of value
set.seed(1234) n <- 28 x <- 1:n + rnorm(n) x <- x * c(1.1, 1, .9, 1) cbind(x, sa(x, 4))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.