age_bandizer: Age Band Creation: Create a new column of 5 year Age Bands...

View source: R/age_bandizer.R

age_bandizerR Documentation

Age Band Creation: Create a new column of 5 year Age Bands from an integer column

Description

Age Band Creation: Create a new column of 5 year Age Bands from an integer column

Usage

age_bandizer(df, Age_col)

Arguments

df

a tidy dataframe in standard Master Patient Index format ie SangerTools::PopHealthData

Age_col

a integer column within @param df NAs must be removed or imputed prior to running this function

Value

A dataframe with width ncol(df)+1, new column will be named Ageband and will be a factor with levels defined

Examples

library(SangerTools)
library(dplyr)
health_data <- SangerTools::PopHealthData

SangerTools documentation built on March 18, 2022, 6:45 p.m.