Learn R Programming

transplantr (version 0.2.0)

ckd_epi: eGFR by CKD-EPI equation

Description

A vectorised function to calculate estimated glomerular filtration rate using the CKD-EPI equation. By default the equation accepts serum creatinine in <U+00B5>mol/l but can be changed to mg/dl by setting the units parameter to "US". To allow for serial measurements over time, such as for transplant follow-up data, there is an optional offset = n parameter which increases the age value used in the equation by n years.

Usage

ckd_epi(creat, age, sex, ethnicity, units = "SI", offset = 0)

Arguments

creat

numeric vector of serum creatinine in <U+00B5>mol/l (or mg/dl if units = "US")

age

numeric vector of age in years (accepts integers or decimals)

sex

character vector of sex ("F" for female, "M" for male)

ethnicity

character vector of patient ethnicity, one of "black" or "non-black"

units

non-vectorised optional parameter for creatinine unit ("SI" for <U+00B5>mol/l (default), "US" for mg/dl)

offset

non-vectorised optional numeric parameter for offset in years

Value

a numeric vector of eGFR values

Details

Reference: Levey AS, Stevens LA, Schmid CH, et al. A new equation to estimate glomerular filtration rate. Ann Intern Med 2009; 150(9):604-612.

Examples

Run this code
# NOT RUN {
ckd_epi(creat = 120, age = 45.2, sex = "M", ethnicity = "non-black")
ckd_epi(creat = 1.5, age = 64.3, sex = "F", ethnicity = "black", units = "US")
# }

Run the code above in your browser using DataLab