Learn R Programming

Kidney.epi R package

This is the source code for the "kidney.epi" R package that contains kidney-related functions for clinical and epidemiological research.

The kidney.epi package is made with care by the research consultancy Scientific-Tools.Org.
Contact us for data analysis or software development at Scientific-Tools.Org or via 'maintainer("kidney.epi")', connect with the author on LinkedIn.
Support this and other Scientific-Tools.Org projects: https://Scientific-Tools.Org/support-us/
Home page and GitHub repository of the package.
Connect with us on social platforms: LinkedIn X/Twitter

Citation for journal publications

citation("kidney.epi")

Bikbov B. kidney.epi: Kidney-Related Functions for Clinical and Epidemiological Research. Scientific-Tools.Org, https://Scientific-Tools.Org. doi:10.32614/CRAN.package.kidney.epi.

Agreement on prefix of function names and internal data frames

nephro. - related to nephrology in general
ktx. - related to kidney transplantation
hd. - related to hemodialysis
pd. - related to peritoneal dialysis
egfr. - related to equations for calculation of estimated glomerular filtration rate
epi. - related to epidemiology in general
service. - service functions or internal purposes of the package (data check, etc)
matrix. - functions for working with matrix

The package gets posted to the comprehensive R archive (CRAN) at intervals, each such posting preceded a thorough test. In general, each new push to CRAN with new function(s) will update the second term of the version number, e.g. 1.2.0 to 1.3.0. Updates only to the code of existing functions increment the third term of the version number, e.g. 1.2.0 to 1.2.1.

Internal datafarames

Internal datafarames are contained in the R/sysdata.rda of the source code, used in the R package functions but not accessible to the user.

  • ktx.kdpi_mapping_table - contains data with mapping KDPI and KDRI reported by OPTN for the years 2014-2024
  • ktx.kdpi_coefficients - contains data with coefficients used by OPTN for the calculation (KDRI scaling factor, chances of hypertension and diabetes in case if they were unknown for donor, etc)

External datafarames

  • ckd.data - contains synthetic data for eGFR calculation in 1000 adults and 1000 children.
  • ktx.data - contains data for 10 kidney transplant patients.

Vignettes

List of vignettes are available via

browseVignettes(package = "kidney.epi").

License

This project is licensed under the LGPL (>=2).

Copy Link

Version

Install

install.packages('kidney.epi')

Monthly Downloads

619

Version

1.3.0

License

LGPL (>= 2)

Maintainer

Boris Bikbov

Last Published

March 31st, 2025

Functions in kidney.epi (1.3.0)

matrix.cross_table

Creates a named matrix from two variables.
ktx.kdpi.optn.show.years

Shows which years are available in the R package for the OPTN mapping table, KDRI scaling factor, etc.
ktx.kdpi.optn

Calculate KDRI and KDPI for deceased kidney donor
ktx.data

A sample dataset with kidney transplant patients.
egfr.schwartz

Calculate eGFR by Schwartz equation (for children only, both "classic" and "quadratic")
egfr.fas.cys

Calculate eGFR by the Full age spectrum (FAS) cystatin-based equation
matrix.get_named_matrix_value

Access matrix cells by row and column names
nephro.proteinuria_category

Calculate proteinuria categories
nephro.albuminuria_category

Calculate albuminuria categories
nephro.gfr_category

Calculate eGFR categories
nephro.kdigo_risk_category

Calculate KDIGO risk categories
service.convert_cystatin

Convert cystatin C values between measurement units.
service.convert_creatinine

Convert creatinine values between measurement units.
matrix.read_excel_to_named_matrix

Read Excel file and convert it to matrix with row and column names.
matrix.save_named_matrix_to_excel

Save a named matrix as an Excel file.
ckd.data

A synthetic dataset contains variables for eGFR calculation.
egfr.ckid_u25.cys

Calculate eGFR by CKiD U25 cystatin-based equation (for children and young adults less then 25 years old)
egfr.ckdepi.cr.2009

Calculate eGFR based on CKD-EPI 2009 creatinine-based equation
egfr.fas.cr

Calculate eGFR by the Full age spectrum (FAS) creatinine-based equation
egfr.ekfc.cys

Calculate eGFR by the EKFC cystatin-based equation
egfr.ckdepi.cr.2021

Calculate eGFR by the CKD-EPI 2021 creatinine-based equation
egfr.ckid_u25.cr

Calculate eGFR by CKiD U25 creatinine-based equation (for children and young adults less then 25 years old)
egfr.ekfc.cr

Calculate eGFR by the EKFC creatinine-based equation
egfr.ckdepi.cr

Alias to the latest eGFR CKD-EPI creatinine-based equation
egfr.ckdepi.cr_cys.2021

Calculate eGFR by the CKD-EPI 2021 creatinine-cystatin-based equation
egfr.fas.cr_cys

Calculate eGFR by the Full age spectrum (FAS) creatinine-cystatin-based equation
egfr.mdrd4

Calculate estimated glomerular filtration rate (eGFR) by MDRD equation
egfr.lm.cr

Calculate eGFR by the revised Lund-Malmö creatinine-based equation