Skip to content

Standardise 'agegroups' vs 'age_groups' spelling in exported function names #331

Description

@sbfnk-bot

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions