Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/derive_var_trtdurd.R
Derives total treatment duration (days) (TRTDURD
)
1 | derive_var_trtdurd(dataset, start_date = TRTSDT, end_date = TRTEDT)
|
dataset |
Input dataset The columns specified by the |
start_date |
The start date A date or date-time object is expected. Default: |
end_date |
The end date A date or date-time object is expected. Default: |
The total treatment duration is derived as the number of days from start to end date plus one.
The input dataset with TRTDURD
added
Stefan Bundfuss
1 2 3 4 5 6 | data <- tibble::tribble(
~TRTSDT, ~TRTEDT,
lubridate::ymd("2020-01-01"), lubridate::ymd("2020-02-24")
)
derive_var_trtdurd(data)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.