timriffe / DemoTools

Tools for the evaluation, adjustment, and standardization of demographic data
https://timriffe.github.io/DemoTools
Other
59 stars 31 forks source link

Implementes mav tails for smooth_age_5 and smooth_age_5_mav #230

Closed cimentadaj closed 3 years ago

cimentadaj commented 3 years ago

Here is a summary of the changes:

All checks are passing locally.

cimentadaj commented 3 years ago

If you need me to change anything (for ex, you don't want a tails arg on smooth_age_5_mav), just let me know and I'll commit extra changes.

cimentadaj commented 3 years ago

mavNew has an extra line for replacing the last value when OAG is TRUE with the original value (aside from the previos fill_mav). However, your points are spot on. This is the new setup:

*mav gains a tails arg which is set to FALSE by default. This simply calls mav_tails if set to TRUE. mav_tails is currently not exported because it just seemed redundant since it needs the result of mav as an argument. Users can now just mav(..., tails = TRUE). All docs have been updated with these changes.

All checks pass locally and all docs have been updated.