MyNixOS website logo
Description

Estimated Glomerular Filtration Rate (eGFR) Calculators.

A comprehensive, vectorised toolkit for estimating glomerular filtration rate (eGFR) and creatinine clearance from serum creatinine, cystatin C, or both. Implements adult, paediatric, and neonatal equations, including the Chronic Kidney Disease Epidemiology Collaboration (CKD-EPI) equations (2009, 2012, 2021), the Modification of Diet in Renal Disease (MDRD) Study equation, Cockcroft-Gault, the European Kidney Function Consortium (EKFC) equations, the Full Age Spectrum (FAS) equations, the Lund-Malmoe equations, the Berlin Initiative Study (BIS) equations, the Schwartz bedside equation, the Chronic Kidney Disease in Children Under 25 (CKiD U25) equations, the Caucasian, Asian, Paediatric, and Adult (CAPA) cystatin C equation, and a neonatal equation. Helpers for body surface area, chronic kidney disease (CKD) staging following the Kidney Disease: Improving Global Outcomes (KDIGO) guideline, and unit conversions are included. Methods are described in Levey et al. (2009) <doi:10.7326/0003-4819-150-9-200905050-00006>, Inker et al. (2021) <doi:10.1056/NEJMoa2102953>, and Pottel et al. (2021) <doi:10.7326/M20-4366>. Inspired by the 'kidney.epi' package.

egfr

R-CMD-check test-coverage Codecov test coverage

egfr is a vectorised R toolkit for estimating glomerular filtration rate (eGFR) and creatinine clearance from serum creatinine, cystatin C, or both. It implements 20 validated adult, paediatric, and neonatal equations, plus helpers for body surface area, KDIGO CKD staging, and unit conversion.

The package is inspired by the kidney.epi package and was ported from the equation set used by eGFR.app.

These equations are screening tools and are not a substitute for measured GFR or clinical judgement.

Installation

Install the released version from R-universe:

install.packages("egfr", repos = "https://mhovd.r-universe.dev")

Or install the development version from GitHub:

# install.packages("remotes")
remotes::install_github("mhovd/egfr")

Quick start

library(egfr)

# CKD-EPI 2021 creatinine (race-free) — recommended for adults
egfr_ckdepi_cr_2021(creatinine = 1.0, age = 50, sex = "female")
#> 68.6

# Fully vectorised: pass vectors for any argument
egfr_ckdepi_cr_2021(
  creatinine = c(0.8, 1.2, 1.5),
  age        = c(40, 65, 72),
  sex        = c("female", "male", "female")
)

# Units: supply creatinine in umol/L instead of mg/dL
egfr_ckdepi_cr_2021(88.4, 50, "female", creatinine_units = "umol/l")

# Classify the result into a KDIGO stage
ckd_stage(egfr_ckdepi_cr_2021(1.0, 50, "female"))
#> "G2"

Available equations

Adult

FunctionEquationBiomarker
egfr_ckdepi_cr_2021()CKD-EPI 2021 (race-free)creatinine
egfr_ckdepi_cys_2021()CKD-EPI 2021 (race-free)cystatin C
egfr_ckdepi_cr_cys_2021()CKD-EPI 2021 (race-free)both
egfr_ckdepi_cr_2009()CKD-EPI 2009 (with race)creatinine
egfr_ckdepi_cys_2012()CKD-EPI 2012cystatin C
egfr_mdrd()MDRD 4-variable (IDMS)creatinine
egfr_cockcroft_gault()Cockcroft-Gault (CrCl)creatinine
egfr_ekfc_cr()EKFC 2021creatinine
egfr_ekfc_cys()EKFC 2023cystatin C
egfr_ekfc_cr_cys()EKFC 2023both
egfr_fas_cr()Full Age Spectrum 2016creatinine
egfr_lund_malmo()Lund-Malmoe Revised 2011creatinine
egfr_bis_cr()Berlin Initiative Study 2012creatinine

Paediatric & neonatal

FunctionEquationBiomarker
egfr_schwartz()Schwartz bedside 2009creatinine
egfr_ckid_u25_cr()CKiD U25 2021creatinine
egfr_ckid_u25_cys()CKiD U25 2021cystatin C
egfr_ckid_u25_cr_cys()CKiD U25 2021both
egfr_ckid_u25_cr_extended()CKiD U25 extended (to 30)creatinine
egfr_capa()CAPA 2014cystatin C
egfr_neonatal()Neonatal 2022creatinine

Helpers

FunctionPurpose
bsa()Body surface area (Du Bois, Haycock, Mosteller)
gfr_bsa_adjust()Convert between absolute and BSA-normalised GFR
ckd_stage()KDIGO GFR category (G1-G5)
convert_creatinine()mg/dL <-> umol/L

Conventions

  • All egfr_*() functions return unrounded values in mL/min/1.73m^2, except egfr_cockcroft_gault(), which returns creatinine clearance in mL/min.
  • Creatinine defaults to mg/dL; pass creatinine_units = "umol/l" to use SI units. Height defaults to cm.
  • Sex labels default to "male"/"female" and can be customised via label_sex_male / label_sex_female.

License

MIT (c) 2026 Markus Hovd.

Metadata

Version

1.1.1

License

Unknown

Platforms (79)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    uefi
    wasip1
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-uefi
  • aarch64-windows
  • aarch64_be-none
  • arc-linux
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-linux
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • sh4-linux
  • vc4-none
  • wasm32-wasip1
  • wasm64-wasip1
  • x86_64-cygwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-uefi
  • x86_64-windows