Skip to contents

Calculates Creatinine clearance with Cockcroft-Gault equation

Usage

crcl(sexf, age, creat, weight)

Arguments

sexf

bool of sex of subject. Female: True, Male: False

age

age of subject (years)

creat

serum creatinine levels (mg/dL)

weight

weight of subject (kg)

Value

CrCl (mL/min)

Examples

crcl(FALSE, 20, 10, 70)
#> [1] 11.66667

df <- data.frame(
  "ID" = c(1, 1, 1, 1, 2, 2, 2, 2),
  "SEX" = c("F", "F", "F", "F", "M", "M", "M", "M"),
  "RACE" = c("WHITE", "WHITE", "WHITE", "WHITE", "BLACK", "BLACK", "BLACK", "BLACK"),
  "AGE" = c(24, 24, 24, 24, 22, 22, 22, 22),
  "CREAT" = c(1, 1, 1, 1, 4, 4, 4, 4),
  "WEIGHT" = c(70, 70, 70, 70, 65, 65, 65, 65)
)

df <- df %>%
  dplyr::group_by(ID) %>%
  dplyr::mutate(CRCL = crcl(is_female(SEX), AGE, CREAT, WEIGHT))