Description Usage Arguments Details Value Author(s) Examples
View source: R/derive_var_trtedtm.R
Derives datetime of last exposure to treatment (TRTEDTM
)
1 2 3 4 5 6 7 | derive_var_trtedtm(
dataset,
dataset_ex,
filter_ex = (EXDOSE > 0 | (EXDOSE == 0 & str_detect(EXTRT, "PLACEBO"))) &
nchar(EXENDTC) >= 10,
subject_keys = vars(STUDYID, USUBJID)
)
|
dataset |
Input dataset The variables specified by the |
dataset_ex |
The variables |
filter_ex |
Filter condition for the ex dataset Only observations of the ex dataset which fulfill the specified condition are considered for the treatment start date. Default: Permitted Values: logical expression |
subject_keys |
Variables to uniquely identify a subject A list of quosures where the expressions are symbols as returned by
|
For each group (with respect to the variables specified for the
by_vars
parameter) the first observation (with respect to the order
specified for the order
parameter) is included in the output dataset.
The input dataset with TRTEDTM
variable added
Stefan Bundfuss
1 2 3 4 5 6 7 8 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.