Learn R Programming

rEHR (version 1.0)

cprd_uniform_hba1c_values: Transforms hba1c values to mmol/mol

Description

This function converts hba1c and fructosamine values to comon mmol/mol values conversions: mmol/L, mg/dL, fructosamine Assumes doctor miscoding for values < 20 after previous transformations

Usage

cprd_uniform_hba1c_values(df)

Arguments

df
a dataframe of hba1c test scores

Value

dataframe with all hba1c values recoded to mmol/mol

Details

The input dataframe must include the data2, data3 and enttype columns and the enttype must equal either 275 (HbA1C) or 356 (Fructosamine)