na_rate | R Documentation |
Extend a timeseries dataset and apply an annual growth rate to it
na_rate(x, rate = 1.1)
x |
Vector with NAs in future time to fill |
Numeric values with a constant rate applied to lagged values.
## Not run:
tibble::tibble(START_YEAR = c(2018:2020),
VALUE = c(1,2,3)) %>%
dplyr::bind_rows(tibble::tibble(START_YEAR = c(2021:2024))) %>%
dplyr::mutate(VALUE = na_rate(VALUE, rate = 0.98))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.