timriffe / DemoTools

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

Implements BPA and BPE #123

Closed cimentadaj closed 4 years ago

cimentadaj commented 4 years ago

This PR does three things:

As for the last, I see you were trying to do some regular expression matching but match.arg already does this by default. I left a comment showing exactly this. We need to make sure I didn't break anything with this change but at least from my devtools::check, all is fine.

timriffe commented 4 years ago

I'll look into the smooth_age_5() Errors being thrown

timriffe commented 4 years ago

fixed- now uses match.arg instead of the homebrew solution. However, looking inside it comes over as sloppy- the original intent was to allow for flexible argument naming, and now it's strict. For example "Karup-King-Newton" has to be "KKN" now, and "cf" will no longer work for "Carrier-Farrag". Making a huge options list also seems silly, since the pre-imagined options before were at least forced to be all lowercase. hmmmm. No harm just less flexible now.