This function adds a new column to the data frame that indicates whether
a systemic failure event has occurred for each patient. The column name and event
definition varies by study:
Usage
add_systemic_failure_event(df)
Arguments
- df
A data frame containing:
- columns starting with 'disease_systemic_status_' containing numerical values
- a 'study' column indicating either 'embrace_i' or 'embrace_ii'
Value
A data frame with additional columns for systemic events. Each patient will
have a value in the column corresponding to their study, with NA in the other column.
Details
EMBRACE-I ('event_systemic_excl_pao'):
- Event defined as occurrence of value 1 or 2 in any systemic status column
EMBRACE-II ('event_systemicfailure'):
- Event defined as occurrence of value 2 in any systemic status column
Examples
if (FALSE) { # \dontrun{
test_data <- tibble(
study = c("embrace_i", "embrace_ii"),
disease_systemic_status_3m = c(1, 2),
disease_systemic_status_6m = c(0, 0)
)
result <- add_systemic_failure_event(test_data)
} # }