View source: R/labels.R View source: R/perform_eval.R
class_esrd_outcome | R Documentation |
Label CKD stages or ESRD outcomes.
class_esrd_outcome(
df,
col,
years,
duration_col,
prefix = NULL,
create_years_col = TRUE
)
df |
Data frame with an eGFR column. |
col |
Column name with ESRD event indicator, 0 or 1. |
years |
Integer horizon, 2 or 5. |
duration_col |
Column name with follow up time in days. |
prefix |
Optional prefix for the derived outcome column. |
create_years_col |
Logical, add a |
The modified data frame with added label columns.
df <- data.frame(
eGFR = c(90, 45, 25, 10),
esrd = c(0, 0, 1, 0),
followup_days = c(365, 800, 500, 1200)
)
class_esrd_outcome(
df,
col = "esrd",
years = 2,
duration_col = "followup_days"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.