get_age_groups: Bin age groups by 5 or 10 years (old and new db)

View source: R/get_age_groups.R

get_age_groupsR Documentation

Bin age groups by 5 or 10 years (old and new db)

Description

This bins ages into age groups by 5 years or 10 years. If bin_by = "old_db_yr", this will allow for old and new db age groups to be combined. This just matches with the old db AGE. For new db, NA are "Unknown"

Usage

get_age_groups(person_df, bin_by = "5_yr", age_column = "AGE")

Arguments

person_df

person df

bin_by

select either "5_yr", "10_yr", or "old_db_yr"

age_column

age column

Value

A new column called age_group_5yr, age_group_10yr or age_groups_both

Examples

## Not run: get_age_groups(person17, bin_by = "10_yr"

jacciz/wisdotcrashdatabase documentation built on June 3, 2023, 2:26 a.m.