Description Usage Arguments Details Value Author(s) Examples
View source: R/derive_var_aendy.R
Adds the analysis end relative day (AENDY
) to the dataset, i.e. study day
of analysis end date
1 | derive_var_aendy(dataset, reference_date = TRTSDT, date = AENDT)
|
dataset |
Input dataset The columns specified by the |
reference_date |
The start date column, e.g., date of first treatment A date or date-time object column is expected. The default is |
date |
The end date column for which the study day should be derived A date or date-time object column is expected. The default is |
The study day is derived as number of days from the start date to the end date. If it is nonnegative, one is added. I.e., the study day of the start date is 1.
The input dataset with AENDY
column added
Stefan Bundfuss
1 2 3 4 5 6 | data <- tibble::tribble(
~TRTSDT, ~AENDT,
lubridate::ymd("2020-01-01"), lubridate::ymd("2020-02-24")
)
derive_var_aendy(data)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.