Description Usage Arguments Examples
Recover original series from a vector of year-to-date averages
| 1 | 
| x | a vector of year-to-date averages | 
| 1 2 3 4 5 6 7 8 9 | library(dplyr)
set.seed(1)
dat <- dplyr::tibble(year = rep(2018:2019, each = 12),
                     month = rep(1:12, times = 2),
                     original = sample(200:300, 24, TRUE)) %>%
  dplyr::group_by(year) %>%
  dplyr::mutate(ytd = roll_mean_year_to_date(original),
                unrolled = unroll_year_to_date(ytd))
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.