Description Usage Arguments Value See Also Examples
Seasonally adjusted
1  | season_adjust(x, order_by, ...)
 | 
x | 
 A numeric vector.  | 
order_by | 
 A date vector to order by.  | 
... | 
 Parameters in [seasonal::seas] function.  | 
A numeric vector of the same length as 'x'.
[seasonal::seas]
1 2 3 4 5 6 7 8 9 10 11 12 13  | ## Not run: 
# example from base
season_adjust((0:107)^2, seq(as.Date("2001-01-01"), as.Date("2009-12-01"), "months"))
# Automatically order even if data not already ordered (example from dplyr)
library(dplyr, warn.conflicts = FALSE)
tsbl <- tsibble(month = seq(as.Date("2001-01-01"), as.Date("2009-12-01"), "months"),
 value = (0:107)^2, index = month)
scrambled <- tsbl %>% slice(sample(nrow(tsbl)))
right <- mutate(scrambled, sa = season_adjust(value, month))
arrange(right, month)
## End(Not run)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.