timriffe / DemoTools

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

Small change requested in lt_abridged2single() #238

Closed sarahertog closed 3 years ago

sarahertog commented 3 years ago

https://github.com/timriffe/DemoTools/blob/0c6090bc281401a1c9d0a61d08602bb932c8f060/R/lt_regroup_age.R#L221

Use a1 instead of Age to define extrapFit and extrapFrom, like this:

extrapFit <- a1[a1 >= min(extrapFit, (max(a1)-20)) & a1 <= max(a1)]

always refit from 110 even if extrapFrom > 110

extrapFrom <- min(max(a1), 110)

timriffe commented 3 years ago

Will push this change once local tests pass on my machine, no prob, thanks

sarahertog commented 3 years ago

Thank you!