Learn R Programming

nmw (version 0.3.0)

add_crcl_cg: Add CRCL Column via Cockcroft-Gault

Description

Add a CRCL column to a NM-style data.frame using Cockcroft-Gault. Column names are configurable.

Usage

add_crcl_cg(
  df,
  age_col = "AGE",
  bwt_col = "BWT",
  sex_col = "SEX",
  crea_col = "CREA",
  out_col = "CRCL"
)

Value

data.frame with the CRCL column added.

Arguments

df

data.frame containing AGE, BWT, SEX, CREA columns.

age_col

name of the age column (years). Default "AGE".

bwt_col

name of the body-weight column (kg). Default "BWT".

sex_col

name of the sex column (0=M, 1=F). Default "SEX".

crea_col

name of the creatinine column (mg/dL). Default "CREA".

out_col

name of the output column. Default "CRCL".