perform_conversions | R Documentation |
Perform unit and code conversions used by KFRE helpers.
perform_conversions(
df,
reverse = FALSE,
convert_all = FALSE,
upcr_col = NULL,
calcium_col = NULL,
phosphate_col = NULL,
albumin_col = NULL
)
df |
Data frame with source columns to convert. |
reverse |
Logical, reverse the conversion if |
convert_all |
Logical, convert all known columns if |
upcr_col |
Column name for urine protein creatinine ratio. |
calcium_col |
Optional column for serum calcium, mg/dL. |
phosphate_col |
Optional column for serum phosphorus, mg/dL. |
albumin_col |
Optional column for serum albumin, g/dL. |
A data frame with converted columns.
df <- data.frame(
upcr = c(100, 400), # mg/g (or g/g scaled accordingly)
albumin = c(40, 38), # g/L
phosphorous = c(1.1, 1.3), # mmol/L
calcium = c(9.2, 8.8) # mg/dL
)
perform_conversions(df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.