Title: | Clinical Coding of Patients with Kidney Disease |
---|---|
Description: | Clinical coding and diagnosis of patients with kidney using clinical practice guidelines. The guidelines used are the evidence-based KDIGO guidelines, see <https://kdigo.org/guidelines/> for more information. This package covers acute kidney injury (AKI), anemia, and chronic kidney disease (CKD). |
Authors: | Alwin Wang [aut, cre] |
Maintainer: | Alwin Wang <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.9.9 |
Built: | 2025-02-15 05:25:31 UTC |
Source: | https://github.com/alwinw/epocakir |
Using KDIGO Clinical Practice Guideline for Acute Kidney Injury Volume 2 | Issue 1 | March 2012
aki_bCr(...) ## S3 method for class 'data.frame' aki_bCr(.data, SCr, bCr, ...) ## S3 method for class 'units' aki_bCr(SCr, bCr, ...) ## S3 method for class 'numeric' aki_bCr(SCr, bCr, ...)
aki_bCr(...) ## S3 method for class 'data.frame' aki_bCr(.data, SCr, bCr, ...) ## S3 method for class 'units' aki_bCr(SCr, bCr, ...) ## S3 method for class 'numeric' aki_bCr(SCr, bCr, ...)
... |
Further optional arguments |
.data |
(data.frame) A data.frame, optional |
SCr |
Serum creatinine
column name, or vector of units or numeric if |
bCr |
Baseline creatinine
column name, or vector of units or numeric if |
AKI Stage 1: 1.5-1.9 times baseline
AKI Stage 2: 2.0-2.9 times baseline
AKI Stage 3: 3.0 times baseline
See https://kdigo.org/guidelines/acute-kidney-injury/ for more details.
(ordered factor) AKI stages
aki_bCr(aki_pt_data, SCr = "SCr_", bCr = "bCr_") aki_pt_data %>% dplyr::mutate(aki = aki_bCr(SCr = SCr_, bCr = bCr_))
aki_bCr(aki_pt_data, SCr = "SCr_", bCr = "bCr_") aki_pt_data %>% dplyr::mutate(aki = aki_bCr(SCr = SCr_, bCr = bCr_))
A sample dataset to demonstrate calculating AKI with epocakir
aki_pt_data
aki_pt_data
An object of class tbl_df
(inherits from tbl
, data.frame
) with 27 rows and 7 columns.
aki_pt_data
aki_pt_data
Using KDIGO Clinical Practice Guideline for Acute Kidney Injury Volume 2 | Issue 1 | March 2012
aki_SCr(...) ## S3 method for class 'data.frame' aki_SCr(.data, SCr, dttm, pt_id, ...) ## S3 method for class 'units' aki_SCr(SCr, dttm, pt_id, ...) ## S3 method for class 'numeric' aki_SCr(SCr, dttm, pt_id, ...)
aki_SCr(...) ## S3 method for class 'data.frame' aki_SCr(.data, SCr, dttm, pt_id, ...) ## S3 method for class 'units' aki_SCr(SCr, dttm, pt_id, ...) ## S3 method for class 'numeric' aki_SCr(SCr, dttm, pt_id, ...)
... |
Further optional arguments |
.data |
(data.frame) A data.frame, optional |
SCr |
Serum creatinine
column name, or vector of units or numeric if |
dttm |
DateTime
column name, or vector of POSIXct if |
pt_id |
Patient ID
column name, or vector of characters or factors if |
AKI Stage 1: 0.3 mg/dl (
26.5 mmol/l) increase
AKI Stage 2: N/A
AKI Stage 3: 4.0 mg/dl (
353.6 mmol/l)
See https://kdigo.org/guidelines/acute-kidney-injury/ for more details.
(ordered factor) AKI stages
aki_SCr(aki_pt_data, SCr = "SCr_", dttm = "dttm_", pt_id = "pt_id_") aki_pt_data %>% dplyr::mutate(aki = aki_SCr(SCr = SCr_, dttm = dttm_, pt_id = pt_id_))
aki_SCr(aki_pt_data, SCr = "SCr_", dttm = "dttm_", pt_id = "pt_id_") aki_pt_data %>% dplyr::mutate(aki = aki_SCr(SCr = SCr_, dttm = dttm_, pt_id = pt_id_))
Ordered factor of AKI stages
aki_stages
aki_stages
An object of class ordered
(inherits from factor
) of length 4.
See https://kdigo.org/guidelines/ckd-evaluation-and-management/ for more details
aki_stages
aki_stages
Using KDIGO Clinical Practice Guideline for Acute Kidney Injury Volume 2 | Issue 1 | March 2012
aki_staging(...) ## S3 method for class 'data.frame' aki_staging( .data, SCr = NULL, bCr = NULL, UO = NULL, dttm = NULL, pt_id = NULL, ... ) ## S3 method for class 'units' aki_staging(SCr = NULL, bCr = NULL, UO = NULL, dttm = NULL, pt_id = NULL, ...) ## S3 method for class 'numeric' aki_staging(SCr = NULL, bCr = NULL, UO = NULL, dttm = NULL, pt_id = NULL, ...)
aki_staging(...) ## S3 method for class 'data.frame' aki_staging( .data, SCr = NULL, bCr = NULL, UO = NULL, dttm = NULL, pt_id = NULL, ... ) ## S3 method for class 'units' aki_staging(SCr = NULL, bCr = NULL, UO = NULL, dttm = NULL, pt_id = NULL, ...) ## S3 method for class 'numeric' aki_staging(SCr = NULL, bCr = NULL, UO = NULL, dttm = NULL, pt_id = NULL, ...)
... |
Further optional arguments |
.data |
(data.frame) A data.frame, optional |
SCr |
Serum creatinine
column name, or vector of units or numeric if |
bCr |
Baseline creatinine
column name, or vector of units or numeric if |
UO |
Urine output
column name, or vector of units or numeric if |
dttm |
DateTime
column name, or vector of POSIXct if |
pt_id |
Patient ID
column name, or vector of characters or factors if |
Provided a baseline creatinine, series of Serum Creatinine readings and/or
Urine Output, aki_staging()
calculates whether or not a patient has AKI.
The staging (1, 2, 3) of AKI is returned.
When multiple columns are provided, aki_staging()
will automatically
calculate whether or not AKI has occurred using each KDIGO definition.
aki_bCr()
: Staging of AKI based on baseline serum creatinine
aki_SCr()
: Staging of AKI based on changes in serum creatinine
aki_UO()
: Staging of AKI based on urine output
The most severe AKI stage is then returned.
See https://kdigo.org/guidelines/acute-kidney-injury/ for more details.
(ordered factor) AKI stages
aki_staging(aki_pt_data, SCr = "SCr_", bCr = "bCr_", UO = "UO_", dttm = "dttm_", pt_id = "pt_id_") aki_pt_data %>% dplyr::mutate(aki = aki_staging(SCr = SCr_, bCr = bCr_, UO = UO_, dttm = dttm_, pt_id = pt_id_))
aki_staging(aki_pt_data, SCr = "SCr_", bCr = "bCr_", UO = "UO_", dttm = "dttm_", pt_id = "pt_id_") aki_pt_data %>% dplyr::mutate(aki = aki_staging(SCr = SCr_, bCr = bCr_, UO = UO_, dttm = dttm_, pt_id = pt_id_))
Using KDIGO Clinical Practice Guideline for Acute Kidney Injury Volume 2 | Issue 1 | March 2012
aki_UO(...) ## S3 method for class 'data.frame' aki_UO(.data, UO, dttm, pt_id, ...) ## S3 method for class 'units' aki_UO(UO, dttm, pt_id, ...) ## S3 method for class 'numeric' aki_UO(UO, dttm, pt_id, ...)
aki_UO(...) ## S3 method for class 'data.frame' aki_UO(.data, UO, dttm, pt_id, ...) ## S3 method for class 'units' aki_UO(UO, dttm, pt_id, ...) ## S3 method for class 'numeric' aki_UO(UO, dttm, pt_id, ...)
... |
Further optional arguments |
.data |
(data.frame) A data.frame, optional |
UO |
Urine output
column name, or vector of units or numeric if |
dttm |
DateTime
column name, or vector of POSIXct if |
pt_id |
Patient ID
column name, or vector of characters or factors if |
AKI Stage 1: <0.5 ml/kg/h for 6–12 hours
AKI Stage 2: <0.5 ml/kg/h for 12 hours
AKI Stage 3: <0.3 ml/kg/h for 24 hours OR Anuria for
12 hours
See https://kdigo.org/guidelines/acute-kidney-injury/ for more details.
(ordered factor) AKI stages
aki_UO(aki_pt_data, UO = "UO_", dttm = "dttm_", pt_id = "pt_id_") aki_pt_data %>% dplyr::mutate(aki = aki_UO(UO = UO_, dttm = dttm_, pt_id = pt_id_))
aki_UO(aki_pt_data, UO = "UO_", dttm = "dttm_", pt_id = "pt_id_") aki_pt_data %>% dplyr::mutate(aki = aki_UO(UO = UO_, dttm = dttm_, pt_id = pt_id_))
Ordered factor of Albuminuria stages
Albuminuria_stages
Albuminuria_stages
An object of class ordered
(inherits from factor
) of length 4.
A1: Normal to mildly increased
A2: Moderately increased
A3: Severely increased
See https://kdigo.org/guidelines/ckd-evaluation-and-management/ for more details
Albuminuria_stages
Albuminuria_stages
Using KDIGO 2012 Clinical Practice Guideline for the Evaluation and Management of Chronic Kidney Disease Volume 3 | Issue 1 | January 2013
Albuminuria_staging_ACR(...) ## S3 method for class 'data.frame' Albuminuria_staging_ACR(.data, ACR, ...) ## S3 method for class 'units' Albuminuria_staging_ACR(ACR, ...) ## S3 method for class 'numeric' Albuminuria_staging_ACR(ACR, ...)
Albuminuria_staging_ACR(...) ## S3 method for class 'data.frame' Albuminuria_staging_ACR(.data, ACR, ...) ## S3 method for class 'units' Albuminuria_staging_ACR(ACR, ...) ## S3 method for class 'numeric' Albuminuria_staging_ACR(ACR, ...)
... |
Further optional arguments |
.data |
(data.frame) A data.frame, optional |
ACR |
Albumin-to-creatinine ratio
column name, or vector of units or numeric if |
A1: Normal to mildly increased
A2: Moderately increased
A3: Severely increased
See https://kdigo.org/guidelines/ckd-evaluation-and-management/ for more details
Albuminuria category
df <- tibble::tibble( ACR = units::set_units(c(-1, NA, 1, 10, 50), "mg/g") ) Albuminuria_staging_ACR(df, "ACR") df %>% dplyr::mutate(GFR_level = Albuminuria_staging_ACR(ACR))
df <- tibble::tibble( ACR = units::set_units(c(-1, NA, 1, 10, 50), "mg/g") ) Albuminuria_staging_ACR(df, "ACR") df %>% dplyr::mutate(GFR_level = Albuminuria_staging_ACR(ACR))
Using KDIGO 2012 Clinical Practice Guideline for the Evaluation and Management of Chronic Kidney Disease Volume 3 | Issue 1 | January 2013
Albuminuria_staging_AER(...) ## S3 method for class 'data.frame' Albuminuria_staging_AER(.data, AER, ...) ## S3 method for class 'units' Albuminuria_staging_AER(AER, ...) ## S3 method for class 'numeric' Albuminuria_staging_AER(AER, ...)
Albuminuria_staging_AER(...) ## S3 method for class 'data.frame' Albuminuria_staging_AER(.data, AER, ...) ## S3 method for class 'units' Albuminuria_staging_AER(AER, ...) ## S3 method for class 'numeric' Albuminuria_staging_AER(AER, ...)
... |
Further optional arguments |
.data |
(data.frame) A data.frame, optional |
AER |
Albumin excretion rate
column name, or vector of units or numeric if |
A1: Normal to mildly increased
A2: Moderately increased
A3: Severely increased
See https://kdigo.org/guidelines/ckd-evaluation-and-management/ for more details
Albuminuria category
df <- tibble::tibble( AER = units::set_units(c(-1, NA, 15, 100, 500), "mg/day") ) Albuminuria_staging_AER(df, "AER") df %>% dplyr::mutate(GFR_level = Albuminuria_staging_AER(AER))
df <- tibble::tibble( AER = units::set_units(c(-1, NA, 15, 100, 500), "mg/day") ) Albuminuria_staging_AER(df, "AER") df %>% dplyr::mutate(GFR_level = Albuminuria_staging_AER(AER))
KDIGO Clinical Practice Guideline for Anemia in Chronic Kidney Disease Volume 2 | Issue 4 | August (2) 2012
anemia(...) ## S3 method for class 'data.frame' anemia(.data, Hb, age, male, ...) ## S3 method for class 'units' anemia(Hb, age, male, ...) ## S3 method for class 'numeric' anemia(Hb, age, male, ...)
anemia(...) ## S3 method for class 'data.frame' anemia(.data, Hb, age, male, ...) ## S3 method for class 'units' anemia(Hb, age, male, ...) ## S3 method for class 'numeric' anemia(Hb, age, male, ...)
... |
Further optional arguments |
.data |
(data.frame) A data.frame, optional |
Hb |
Hemoglobin concentration
column name, or vector of units or numeric if |
age |
Age of patient
column name, or vector of units or numeric if |
male |
Male or not
column name, or vector of logical (TRUE/FALSE) if |
Adults and children >15 years with CKD when the Hb concentration is <13.0 g/dl (<130 g/l) in males and <12.0 g/dl (<120 g/l) in females.
Children with CKD if Hb concentration is <11.0 g/dl (<110 g/l) in children 0.5-5 years, <11.5 g/dl (115 g/l) in children 5-12 years, and <12.0 g/dl (120 g/l) in children 12-15 years.
See https://kdigo.org/guidelines/anemia-in-ckd/ for more details.
Anemia
as logical TRUE
or FALSE
anemia(anemia_pt_data, Hb = "Hb", age = "age", male = "male") anemia_pt_data %>% dplyr::mutate(anemia = anemia(Hb = Hb, age = age, male = male))
anemia(anemia_pt_data, Hb = "Hb", age = "age", male = "male") anemia_pt_data %>% dplyr::mutate(anemia = anemia(Hb = Hb, age = age, male = male))
A sample dataset to demonstrate calculating anemia with epocakir
anemia_pt_data
anemia_pt_data
An object of class tbl_df
(inherits from tbl
, data.frame
) with 10 rows and 3 columns.
anemia_pt_data
anemia_pt_data
Refer to conversion_factors
for a full list of available conversions
as_metric(param = NULL, meas = NULL, ..., value_only = FALSE)
as_metric(param = NULL, meas = NULL, ..., value_only = FALSE)
param |
(character) Name of measurement, e.g. param = "SCr" |
meas |
(units) Measurement or vector of measurements |
... |
(units) One of conversion_factors$parameter, e.g. SCr = units::set_units(88.4, "umol/l"). Case insensitive. |
value_only |
(logical) Return as value only without units |
(units) Converted measured value or vector of measured values,
unless value_only = TRUE
as_metric(param = "scr", meas = units::set_units(88.4, "umol/l")) as_metric("scr", units::set_units(88.4, "umol/l")) values <- units::set_units(c(60, 70, 80), "umol/l") as_metric(SCr = values)
as_metric(param = "scr", meas = units::set_units(88.4, "umol/l")) as_metric("scr", units::set_units(88.4, "umol/l")) values <- units::set_units(c(60, 70, 80), "umol/l") as_metric(SCr = values)
Convert binary data to factors based on column name
binary2factor(.data, ...)
binary2factor(.data, ...)
.data |
(data.frame) A data frame or data frame extension (e.g. a tibble) |
... |
Name-value pairs. The names of columns to be transformed |
(data.frame) An object of the same type as .data
df <- data.frame( a = c(1, 0, NA, 1, 0), b = c("y", "n", NA, "Y", "n"), c = c("yes", "no", NA, "Yes", "No"), d = c(TRUE, FALSE, NA, TRUE, FALSE), e = c(1, 2, 3, 4, 5) ) binary2factor(df, a, b:d) df %>% binary2factor(-e)
df <- data.frame( a = c(1, 0, NA, 1, 0), b = c("y", "n", NA, "Y", "n"), c = c("yes", "no", NA, "Yes", "No"), d = c(TRUE, FALSE, NA, TRUE, FALSE), e = c(1, 2, 3, 4, 5) ) binary2factor(df, a, b:d) df %>% binary2factor(-e)
A sample dataset to demonstrate utility functions in epocakir
clinical_obvs
clinical_obvs
An object of class tbl_df
(inherits from tbl
, data.frame
) with 3 rows and 9 columns.
clinical_obvs
clinical_obvs
Combine date and time columns into a single DateTime column
combine_date_time_cols(.data, tz = NULL)
combine_date_time_cols(.data, tz = NULL)
.data |
(data.frame) A data frame or data frame extension (e.g. a tibble) |
tz |
(character) a time zone name (default: time zone of the POSIXt object x) |
(data.frame) An object of the same type as .data
df <- data.frame( date_a = as.Date(c("2020-01-01", "2020-01-02")), date_b = as.POSIXct(c("2020-02-01", "2020-02-02")), time_a = as.POSIXct(c("1900-01-01 01:01:01", "1900-01-01 02:02:02")), time_b = as.POSIXct(c("1900-01-01 01:01:01", "1900-01-01 02:02:02")) ) combine_date_time_cols(df)
df <- data.frame( date_a = as.Date(c("2020-01-01", "2020-01-02")), date_b = as.POSIXct(c("2020-02-01", "2020-02-02")), time_a = as.POSIXct(c("1900-01-01 01:01:01", "1900-01-01 02:02:02")), time_b = as.POSIXct(c("1900-01-01 01:01:01", "1900-01-01 02:02:02")) ) combine_date_time_cols(df)
Compares a value with all previous values
combn_changes(...) ## S3 method for class 'data.frame' combn_changes(.data, dttm, val, pt_id, ...) ## S3 method for class 'POSIXct' combn_changes(dttm, val, pt_id, ...)
combn_changes(...) ## S3 method for class 'data.frame' combn_changes(.data, dttm, val, pt_id, ...) ## S3 method for class 'POSIXct' combn_changes(dttm, val, pt_id, ...)
... |
Further optional arguments |
.data |
(data.frame) A data.frame, optional |
dttm |
DateTime
column name, or vector of POSIXct if |
val |
Variable
column name, or vector of units or numeric if |
pt_id |
Patient ID
column name, or vector of characters or factors if |
Combinatorics changes of the same type provided (numeric or units)
combn_changes(aki_pt_data, dttm = "dttm_", val = "SCr_", pt_id = "pt_id_") aki_pt_data %>% combn_changes(dttm_, SCr_, pt_id_)
combn_changes(aki_pt_data, dttm = "dttm_", val = "SCr_", pt_id = "pt_id_") aki_pt_data %>% combn_changes(dttm_, SCr_, pt_id_)
List of conversion factors based on tables in KDIGO Clinical Practice Guidelines.
conversion_factors
conversion_factors
An object of class tbl_df
(inherits from tbl
, data.frame
) with 21 rows and 4 columns.
Name of the measurement
Metric units for the parameter
Molecular weight (where required)
Full name
conversion_factors
conversion_factors
Calculate age from DOB
dob2age(dob, age_on = lubridate::today(), fun = NULL, units = "years", ...)
dob2age(dob, age_on = lubridate::today(), fun = NULL, units = "years", ...)
dob |
The date or vector of dates representing date(s) of birth. |
age_on |
(Date) The date on which age is to be calculated. Defaults to today. |
fun |
(function) The function to be applied to the age, e.g. floor. Defaults to NULL. |
units |
(character) The units to measure age in, e.g. "years".
Only used if |
... |
Further optional arguments that will be passed to |
(duration) The age as a duration.
dob2age(lubridate::as_date("1990-01-01")) dob2age( dob = c( lubridate::as_date("1990-01-01"), lubridate::as_date("1994-01-01"), lubridate::as_date("1998-01-01") ), age_on = lubridate::as_date("2002-12-31"), fun = floor )
dob2age(lubridate::as_date("1990-01-01")) dob2age( dob = c( lubridate::as_date("1990-01-01"), lubridate::as_date("1994-01-01"), lubridate::as_date("1998-01-01") ), age_on = lubridate::as_date("2002-12-31"), fun = floor )
Using KDIGO 2012 Clinical Practice Guideline for the Evaluation and Management of Chronic Kidney Disease Volume 3 | Issue 1 | January 2013
eGFR(...) ## S3 method for class 'data.frame' eGFR( .data, SCr = NULL, SCysC = NULL, Age = NULL, height = NULL, BUN = NULL, male = NULL, black = NULL, pediatric = NULL, ... ) ## S3 method for class 'units' eGFR( SCr = NULL, SCysC = NULL, Age = NULL, height = NULL, BUN = NULL, male = NULL, black = NULL, pediatric = NULL, ... ) ## S3 method for class 'numeric' eGFR( SCr = NULL, SCysC = NULL, Age = NULL, height = NULL, BUN = NULL, male = NULL, black = NULL, pediatric = NULL, ... )
eGFR(...) ## S3 method for class 'data.frame' eGFR( .data, SCr = NULL, SCysC = NULL, Age = NULL, height = NULL, BUN = NULL, male = NULL, black = NULL, pediatric = NULL, ... ) ## S3 method for class 'units' eGFR( SCr = NULL, SCysC = NULL, Age = NULL, height = NULL, BUN = NULL, male = NULL, black = NULL, pediatric = NULL, ... ) ## S3 method for class 'numeric' eGFR( SCr = NULL, SCysC = NULL, Age = NULL, height = NULL, BUN = NULL, male = NULL, black = NULL, pediatric = NULL, ... )
... |
Further optional arguments |
.data |
(data.frame) A data.frame, optional |
SCr |
Serum creatinine
column name, or vector of units or numeric if |
SCysC |
Serum Cystatin C
column name, or vector of units or numeric if |
Age |
Age of patient
column name, or vector of units or numeric if |
height |
Height of patient
column name, or vector of units or numeric if |
BUN |
Blood urea nitrogen
column name, or vector of units or numeric if |
male |
Male or not
column name, or vector of logical (TRUE/FALSE) if |
black |
Black race or not
column name, or vector of logical (TRUE/FALSE) if |
pediatric |
(logical) Pediatric or not
column name, or vector of logical (TRUE/FALSE) if |
Automatic selection of equation to estimation the Glomerular Filtration Rate (eGFR), based on input data
eGFR_adult_SCr()
: 2009 CKD-EPI creatinine equation
eGFR_adult_SCysC()
: 2012 CKD-EPI cystatin C equation
eGFR_adult_SCr_SCysC()
: 2012 CKD-EPI creatinine-cystatin C equation
eGFR_child_SCr()
: Pediatric creatinine-based equation
eGFR_child_SCr_BUN()
: Pediatric creatinine-BUN equation
eGFR_child_SCysC()
: Pediatric cystatin C-based equation
See https://kdigo.org/guidelines/ckd-evaluation-and-management/ for more details
(units) Estimated glomerular filtration rate (eGFR) of the same type provided (numeric or units in ml/min/1.73m2)
eGFR(eGFR_pt_data, SCr = "SCr_", SCysC = "SCysC_", Age = "Age_", height = "height_", BUN = "BUN_", male = "male_", black = "black_", pediatric = "pediatric_" ) eGFR_pt_data %>% dplyr::mutate(eGFR = eGFR( SCr = SCr_, SCysC = SCysC_, Age = Age_, height = height_, BUN = BUN_, male = male_, black = black_, pediatric = pediatric_ ))
eGFR(eGFR_pt_data, SCr = "SCr_", SCysC = "SCysC_", Age = "Age_", height = "height_", BUN = "BUN_", male = "male_", black = "black_", pediatric = "pediatric_" ) eGFR_pt_data %>% dplyr::mutate(eGFR = eGFR( SCr = SCr_, SCysC = SCysC_, Age = Age_, height = height_, BUN = BUN_, male = male_, black = black_, pediatric = pediatric_ ))
Using KDIGO 2012 Clinical Practice Guideline for the Evaluation and Management of Chronic Kidney Disease Volume 3 | Issue 1 | January 2013
eGFR_adult_SCr(...) ## S3 method for class 'data.frame' eGFR_adult_SCr(.data, SCr, Age, male, black, ...) ## S3 method for class 'units' eGFR_adult_SCr(SCr, Age, male, black, ...) ## S3 method for class 'numeric' eGFR_adult_SCr(SCr, Age, male, black, ...)
eGFR_adult_SCr(...) ## S3 method for class 'data.frame' eGFR_adult_SCr(.data, SCr, Age, male, black, ...) ## S3 method for class 'units' eGFR_adult_SCr(SCr, Age, male, black, ...) ## S3 method for class 'numeric' eGFR_adult_SCr(SCr, Age, male, black, ...)
... |
Further optional arguments |
.data |
(data.frame) A data.frame, optional |
SCr |
Serum creatinine
column name, or vector of units or numeric if |
Age |
Age of patient
column name, or vector of units or numeric if |
male |
Male or not
column name, or vector of logical (TRUE/FALSE) if |
black |
Black race or not
column name, or vector of logical (TRUE/FALSE) if |
See https://kdigo.org/guidelines/ckd-evaluation-and-management/ for more details
Estimated GFR of the same type provided (numeric or units)
eGFR_adult_SCr(eGFR_pt_data, SCr = "SCr_", Age = "Age_", male = "male_", black = "black_" ) eGFR_pt_data %>% dplyr::mutate(eGFR = eGFR_adult_SCr( SCr = SCr_, Age = Age_, male = male_, black = black_ ))
eGFR_adult_SCr(eGFR_pt_data, SCr = "SCr_", Age = "Age_", male = "male_", black = "black_" ) eGFR_pt_data %>% dplyr::mutate(eGFR = eGFR_adult_SCr( SCr = SCr_, Age = Age_, male = male_, black = black_ ))
Using KDIGO 2012 Clinical Practice Guideline for the Evaluation and Management of Chronic Kidney Disease Volume 3 | Issue 1 | January 2013
eGFR_adult_SCr_SCysC(...) ## S3 method for class 'data.frame' eGFR_adult_SCr_SCysC(.data, SCr, SCysC, Age, male, black, ...) ## S3 method for class 'units' eGFR_adult_SCr_SCysC(SCr, SCysC, Age, male, black, ...) ## S3 method for class 'numeric' eGFR_adult_SCr_SCysC(SCr, SCysC, Age, male, black, ...)
eGFR_adult_SCr_SCysC(...) ## S3 method for class 'data.frame' eGFR_adult_SCr_SCysC(.data, SCr, SCysC, Age, male, black, ...) ## S3 method for class 'units' eGFR_adult_SCr_SCysC(SCr, SCysC, Age, male, black, ...) ## S3 method for class 'numeric' eGFR_adult_SCr_SCysC(SCr, SCysC, Age, male, black, ...)
... |
Further optional arguments |
.data |
(data.frame) A data.frame, optional |
SCr |
Serum creatinine
column name, or vector of units or numeric if |
SCysC |
Serum Cystatin C
column name, or vector of units or numeric if |
Age |
Age of patient
column name, or vector of units or numeric if |
male |
Male or not
column name, or vector of logical (TRUE/FALSE) if |
black |
Black race or not
column name, or vector of logical (TRUE/FALSE) if |
See https://kdigo.org/guidelines/ckd-evaluation-and-management/ for more details
Estimated GFR of the same type provided (numeric or units)
eGFR_adult_SCr_SCysC(eGFR_pt_data, SCr = "SCr_", SCysC = "SCysC_", Age = "Age_", male = "male_", black = "black_" ) eGFR_pt_data %>% dplyr::mutate(eGFR = eGFR_adult_SCr_SCysC( SCr = SCr_, SCysC = SCysC_, Age = Age_, male = male_, black = black_ ))
eGFR_adult_SCr_SCysC(eGFR_pt_data, SCr = "SCr_", SCysC = "SCysC_", Age = "Age_", male = "male_", black = "black_" ) eGFR_pt_data %>% dplyr::mutate(eGFR = eGFR_adult_SCr_SCysC( SCr = SCr_, SCysC = SCysC_, Age = Age_, male = male_, black = black_ ))
Using KDIGO 2012 Clinical Practice Guideline for the Evaluation and Management of Chronic Kidney Disease Volume 3 | Issue 1 | January 2013
eGFR_adult_SCysC(...) ## S3 method for class 'data.frame' eGFR_adult_SCysC(.data, SCysC, Age, male, ...) ## S3 method for class 'units' eGFR_adult_SCysC(SCysC, Age, male, ...) ## S3 method for class 'numeric' eGFR_adult_SCysC(SCysC, Age, male, ...)
eGFR_adult_SCysC(...) ## S3 method for class 'data.frame' eGFR_adult_SCysC(.data, SCysC, Age, male, ...) ## S3 method for class 'units' eGFR_adult_SCysC(SCysC, Age, male, ...) ## S3 method for class 'numeric' eGFR_adult_SCysC(SCysC, Age, male, ...)
... |
Further optional arguments |
.data |
(data.frame) A data.frame, optional |
SCysC |
Serum Cystatin C
column name, or vector of units or numeric if |
Age |
Age of patient
column name, or vector of units or numeric if |
male |
Male or not
column name, or vector of logical (TRUE/FALSE) if |
See https://kdigo.org/guidelines/ckd-evaluation-and-management/ for more details
Estimated GFR of the same type provided (numeric or units)
eGFR_adult_SCysC(eGFR_pt_data, SCysC = "SCysC_", Age = "Age_", male = "male_" ) eGFR_pt_data %>% dplyr::mutate(eGFR = eGFR_adult_SCysC( SCysC = SCysC_, Age = Age_, male = male_ ))
eGFR_adult_SCysC(eGFR_pt_data, SCysC = "SCysC_", Age = "Age_", male = "male_" ) eGFR_pt_data %>% dplyr::mutate(eGFR = eGFR_adult_SCysC( SCysC = SCysC_, Age = Age_, male = male_ ))
Using KDIGO 2012 Clinical Practice Guideline for the Evaluation and Management of Chronic Kidney Disease Volume 3 | Issue 1 | January 2013
eGFR_child_SCr(...) ## S3 method for class 'data.frame' eGFR_child_SCr(.data, SCr, height, ...) ## S3 method for class 'units' eGFR_child_SCr(SCr, height, ...) ## S3 method for class 'numeric' eGFR_child_SCr(SCr, height, ...)
eGFR_child_SCr(...) ## S3 method for class 'data.frame' eGFR_child_SCr(.data, SCr, height, ...) ## S3 method for class 'units' eGFR_child_SCr(SCr, height, ...) ## S3 method for class 'numeric' eGFR_child_SCr(SCr, height, ...)
... |
Further optional arguments |
.data |
(data.frame) A data.frame, optional |
SCr |
Serum creatinine
column name, or vector of units or numeric if |
height |
Height of patient
column name, or vector of units or numeric if |
See https://kdigo.org/guidelines/ckd-evaluation-and-management/ for more details
Estimated GFR of the same type provided (numeric or units)
eGFR_child_SCr(eGFR_pt_data, SCr = "SCr_", height = "height_" ) eGFR_pt_data %>% dplyr::mutate(eGFR = eGFR_child_SCr( SCr = SCr_, height = height_, ))
eGFR_child_SCr(eGFR_pt_data, SCr = "SCr_", height = "height_" ) eGFR_pt_data %>% dplyr::mutate(eGFR = eGFR_child_SCr( SCr = SCr_, height = height_, ))
Using KDIGO 2012 Clinical Practice Guideline for the Evaluation and Management of Chronic Kidney Disease Volume 3 | Issue 1 | January 2013
eGFR_child_SCr_BUN(...) ## S3 method for class 'data.frame' eGFR_child_SCr_BUN(.data, SCr, height, BUN, ...) ## S3 method for class 'units' eGFR_child_SCr_BUN(SCr, height, BUN, ...) ## S3 method for class 'numeric' eGFR_child_SCr_BUN(SCr, height, BUN, ...)
eGFR_child_SCr_BUN(...) ## S3 method for class 'data.frame' eGFR_child_SCr_BUN(.data, SCr, height, BUN, ...) ## S3 method for class 'units' eGFR_child_SCr_BUN(SCr, height, BUN, ...) ## S3 method for class 'numeric' eGFR_child_SCr_BUN(SCr, height, BUN, ...)
... |
Further optional arguments |
.data |
(data.frame) A data.frame, optional |
SCr |
Serum creatinine
column name, or vector of units or numeric if |
height |
Height of patient
column name, or vector of units or numeric if |
BUN |
Blood urea nitrogen
column name, or vector of units or numeric if |
See https://kdigo.org/guidelines/ckd-evaluation-and-management/ for more details
Estimated GFR of the same type provided (numeric or units)
eGFR_child_SCr_BUN(eGFR_pt_data, SCr = "SCr_", height = "height_", BUN = "BUN_", ) eGFR_pt_data %>% dplyr::mutate(eGFR = eGFR_child_SCr_BUN( SCr = SCr_, height = height_, BUN = BUN_, ))
eGFR_child_SCr_BUN(eGFR_pt_data, SCr = "SCr_", height = "height_", BUN = "BUN_", ) eGFR_pt_data %>% dplyr::mutate(eGFR = eGFR_child_SCr_BUN( SCr = SCr_, height = height_, BUN = BUN_, ))
Using KDIGO 2012 Clinical Practice Guideline for the Evaluation and Management of Chronic Kidney Disease Volume 3 | Issue 1 | January 2013
eGFR_child_SCysC(...) ## S3 method for class 'data.frame' eGFR_child_SCysC(.data, SCysC, ...) ## S3 method for class 'units' eGFR_child_SCysC(SCysC, ...) ## S3 method for class 'numeric' eGFR_child_SCysC(SCysC, ...)
eGFR_child_SCysC(...) ## S3 method for class 'data.frame' eGFR_child_SCysC(.data, SCysC, ...) ## S3 method for class 'units' eGFR_child_SCysC(SCysC, ...) ## S3 method for class 'numeric' eGFR_child_SCysC(SCysC, ...)
... |
Further optional arguments |
.data |
(data.frame) A data.frame, optional |
SCysC |
Serum Cystatin C
column name, or vector of units or numeric if |
See https://kdigo.org/guidelines/ckd-evaluation-and-management/ for more details
Estimated GFR of the same type provided (numeric or units)
eGFR_child_SCysC(eGFR_pt_data, SCysC = "SCysC_" ) eGFR_pt_data %>% dplyr::mutate(eGFR = eGFR_child_SCysC( SCysC = SCysC_ ))
eGFR_child_SCysC(eGFR_pt_data, SCysC = "SCysC_" ) eGFR_pt_data %>% dplyr::mutate(eGFR = eGFR_child_SCysC( SCysC = SCysC_ ))
A sample dataset to demonstrate calculating eGFR with epocakir
eGFR_pt_data
eGFR_pt_data
An object of class tbl_df
(inherits from tbl
, data.frame
) with 51 rows and 10 columns.
eGFR_pt_data
eGFR_pt_data
Ordered factor of GFR stages
GFR_stages
GFR_stages
An object of class ordered
(inherits from factor
) of length 6.
See https://kdigo.org/guidelines/ckd-evaluation-and-management/ for more details
GFR_stages
GFR_stages
Using KDIGO 2012 Clinical Practice Guideline for the Evaluation and Management of Chronic Kidney Disease Volume 3 | Issue 1 | January 2013
GFR_staging(...) ## S3 method for class 'data.frame' GFR_staging(.data, GFR, ...) ## S3 method for class 'units' GFR_staging(GFR, ...) ## S3 method for class 'numeric' GFR_staging(GFR, ...)
GFR_staging(...) ## S3 method for class 'data.frame' GFR_staging(.data, GFR, ...) ## S3 method for class 'units' GFR_staging(GFR, ...) ## S3 method for class 'numeric' GFR_staging(GFR, ...)
... |
Further optional arguments |
.data |
(data.frame) A data.frame, optional |
GFR |
Glomerular filtration rate
column name, or vector of units or numeric if |
G1: Normal or high GFR, 90
G2: Mildly decreased, 60-89
G3a: Mildly to moderately decreased, 45-59
G3b: Moderately to severely decreased, 30-44
G4: Severely decreased, 15-29
G5: Kidney failure, <15
See https://kdigo.org/guidelines/ckd-evaluation-and-management/ for more details
GFR category
df <- tibble::tibble( eGFR = units::set_units(c(-1, NA, 100, 70, 50, 35, 20, 10), "mL/min/1.73m2") ) GFR_staging(df, "eGFR") df %>% dplyr::mutate(GFR_level = GFR_staging(eGFR))
df <- tibble::tibble( eGFR = units::set_units(c(-1, NA, 100, 70, 50, 35, 20, 10), "mL/min/1.73m2") ) GFR_staging(df, "eGFR") df %>% dplyr::mutate(GFR_level = GFR_staging(eGFR))