calc_growth | R Documentation |
Helper function for calculating growth. Returns NA_real_ if the
calc_growth(x, y)
x |
numerator to calculate growth - most recent metric |
y |
denominator to calculate growth - lagged metric |
Other MDB helper functions:
format_indicator()
,
label_aggregation()
,
make_achv_shape()
,
make_chg_shape()
## Not run:
calc_growth(110, 100) #should give 10%
df %>% mutate(z_change = calc_growth(results_cumulative, dplyr::lag(results_cumulative, n = 4)))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.