Skip to contents

Calculates and adds time-related columns for brachytherapy (BT) and external beam radiation therapy (EBRT): time to first BT fraction, overall treatment time for EBRT, and time to BT as a percentage of EBRT duration.

Usage

add_time_to_bt(x)

Arguments

x

Data frame with EBRT dates and first BT fraction date

Value

Data frame with added columns: `time_to_bt`, `ott_ebrt`, and `time_to_bt_percent`

Examples

if (FALSE) { # \dontrun{
df <- data.frame(
  embrace_id = c(1, 2),
  ebrt_start_date_tdvh = as.Date(c("2022-01-01", "2022-01-15")),
  ebrt_end_date_tdvh = as.Date(c("2022-01-31", "2022-02-15")),
  fraction01date_tdvh = as.Date(c("2022-01-05", "2022-01-18"))
)
add_time_to_bt(df)
} # }