Skip to contents

This function adds a column indicating cancer-specific death events and returns a tibble with the created column and all columns used for verification.

Usage

emii_add_cancer_specific_with_verification(.data, save_excel = FALSE)

Arguments

.data

The input dataframe containing patient vital status data

save_excel

Logical indicating whether to save results as Excel file (default: FALSE)

Value

A tibble with the cancer-specific survival variable and relevant columns

Examples

if (FALSE) { # \dontrun{
data <- tibble(
  embrace_id = c("A1", "A2", "A3"),
  event_vitalstatus = c(1, 1, 0),
  vital_status_cause_of_death_vital_status = c(1, 2, NA)
)
result <- emii_add_cancer_specific_with_verification(data)
result <- emii_add_cancer_specific_with_verification(data, save_excel = TRUE)
} # }