Summary
The exported API spells "age groups" two ways, which is inconsistent and easy to get wrong:
agegroups (one word): reduce_agegroups(), limits_to_agegroups(), agegroups_to_limits()
age_groups (snake_case): assign_age_groups()
The same split shows up internally too (agegroups vs age_groups appear in roughly a 1:2 ratio across R/), alongside the dotted age.group column name.
We should pick one spelling for exported function names and standardise.
Options
- Standardise on
age_groups (snake_case): rename reduce_agegroups() → reduce_age_groups(), limits_to_agegroups() → limits_to_age_groups(), agegroups_to_limits() → age_groups_to_limits(). Most consistent with the rest of the package's snake_case (and with assign_age_groups() / the age.group column), but deprecates three exported functions.
- Standardise on
agegroups (one word): rename assign_age_groups() → assign_agegroups(). Only one function to deprecate, but agegroups is the less idiomatic spelling.
Either way it's a deprecation cycle (rename + keep the old name as a deprecated alias via lifecycle, as in #328/#329), so the choice is mainly about which spelling we want long-term vs. how many aliases to carry.
My lean is age_groups for snake_case consistency, but it's the more disruptive option — your call.
Context
Came up while choosing the regroup_ages() name in #328 / #329.
Summary
The exported API spells "age groups" two ways, which is inconsistent and easy to get wrong:
agegroups(one word):reduce_agegroups(),limits_to_agegroups(),agegroups_to_limits()age_groups(snake_case):assign_age_groups()The same split shows up internally too (
agegroupsvsage_groupsappear in roughly a 1:2 ratio acrossR/), alongside the dottedage.groupcolumn name.We should pick one spelling for exported function names and standardise.
Options
age_groups(snake_case): renamereduce_agegroups()→reduce_age_groups(),limits_to_agegroups()→limits_to_age_groups(),agegroups_to_limits()→age_groups_to_limits(). Most consistent with the rest of the package's snake_case (and withassign_age_groups()/ theage.groupcolumn), but deprecates three exported functions.agegroups(one word): renameassign_age_groups()→assign_agegroups(). Only one function to deprecate, butagegroupsis the less idiomatic spelling.Either way it's a deprecation cycle (rename + keep the old name as a deprecated alias via
lifecycle, as in #328/#329), so the choice is mainly about which spelling we want long-term vs. how many aliases to carry.My lean is
age_groupsfor snake_case consistency, but it's the more disruptive option — your call.Context
Came up while choosing the
regroup_ages()name in #328 / #329.