calculate_egfr_ckdepi_cysc: Calculate estimated GFR by 2021 CKD-EPI creatine/Cystatin C...

calculate_egfr_ckdepi_cyscR Documentation

Calculate estimated GFR by 2021 CKD-EPI creatine/Cystatin C equation

Description

Calculates estimated glomerular filtration rate (GFR) by several common methods. Converts weight to Kg and Height to cm if needed. Available methods for eGFR calculations include:

* CKD-EPI(2021) * CKD-EPI Cystatin-C * MDRD * Cockcroft-Gault

Usage

calculate_egfr_ckdepi_cysc(age, sex, creatinine, cystatin)

Arguments

age

Age, in years

sex

Sex

creatinine

creatinine (mg/dL)

cystatin

cystatin C (mg/L)

Value

a numeric vector with eGFR (ml/min/1.73m^2)

Examples

calculate_egfr_ckdepi_cysc(age=50, sex = "Female", creatinine=1.0, cystatin=1.5) # 54
calculate_egfr_ckdepi_cysc(age=50, sex = "Male", creatinine=1.0, cystatin=1.5) # 54
calculate_egfr_ckdepi_cysc(age=50, sex = "Female", creatinine=0.6, cystatin=0.7) # 115
calculate_egfr_ckdepi_cysc(age=50, sex = "Male", creatinine=0.6, cystatin=0.7) # 123
calculate_egfr_ckdepi_cysc(age=50, sex = "Female", creatinine=0.6, cystatin=0.8) # 111
calculate_egfr_ckdepi_cysc(age=50, sex = "Male", creatinine=0.6, cystatin=0.8) # 118

# original has been vectorized to handle multiple results
data.frame(age=c(5,10,15,35, 50),
           sex=rep("Male",5),
           creatinine=abs(rnorm(5, 1.2)),
           CysC=rep(1.2,5)) |>
  dplyr::mutate(egfr= calculate_egfr_ckdepi_cysc(age, sex, creatinine, CysC))

JMLuther/tabletools documentation built on April 14, 2025, 3:09 a.m.