derive_var_last_dose_date {admiral} | R Documentation |
Add a variable for the dose date or datetime of the last dose to the input dataset.
Note: This is a wrapper function for the function derive_vars_last_dose()
.
This function is deprecated, please use derive_vars_joined()
instead.
derive_var_last_dose_date(
dataset,
dataset_ex,
filter_ex = NULL,
by_vars = exprs(STUDYID, USUBJID),
dose_id = exprs(),
dose_date,
analysis_date,
single_dose_condition = (EXDOSFRQ == "ONCE"),
new_var,
output_datetime = TRUE,
traceability_vars = NULL
)
dataset |
Input dataset.
The variables specified by the |
dataset_ex |
Input EX dataset.
The variables specified by the |
filter_ex |
Filtering condition applied to EX dataset. For example, it can be used to filter for valid dose. Defaults to NULL. |
by_vars |
Variables to join by (created by |
dose_id |
Variables to identify unique dose (created by |
dose_date |
The EX dose date variable. A date or date-time object is expected. |
analysis_date |
The analysis date variable. A date or date-time object is expected. |
single_dose_condition |
The condition for checking if |
new_var |
The new date or datetime variable added to |
output_datetime |
Display |
traceability_vars |
A named list returned by |
The last dose date is derived as the maximum dose date where the
dose_date
is lower to or equal to the analysis_date
per by_vars
for
each observation in dataset
. When output_datetime
is TRUE
and time is
missing, then the last dose date time is imputed to 00:00:00
. However, if
date is missing, then no imputation is done.
If dose information is aggregated (i.e. is a dosing frequency other than "ONCE"
over a period defined by a start and end date) the function
create_single_dose_dataset()
can be used to generate single doses from
aggregate dose information and satisfy single_dose_condition
.
Input dataset with additional column new_var
.
Other deprecated:
derive_param_extreme_event()
,
derive_var_basetype()
,
derive_var_confirmation_flag()
,
derive_var_last_dose_amt()
,
derive_var_last_dose_grp()
,
derive_var_merged_cat()
,
derive_var_merged_character()
,
derive_vars_last_dose()