Either supply dfs_by_year (named list mapping year string /
integer to a data.frame) or df + year_col.
Usage
mrm_uof_yoy_change(
dfs_by_year = NULL,
df = NULL,
year_col = NULL,
count_col = NULL
)
Arguments
- dfs_by_year
Named list of data.frames, names coerced
to integer years.
- df
A data.frame to be grouped by year_col.
- year_col
Required when df is supplied.
- count_col
Optional column to sum within each year (rows
counted otherwise).
Value
Named list with years, counts, yoy_pct,
change_point_year, mean_abs_yoy_pct.
Details
Change-point detection is the manual largest-absolute-difference
heuristic (the R port does not require changepoint).