View source: R/derive_var_extreme_date.R
date_source | R Documentation |
date_source
object The date_source()
function has been superseded in favor of derive_vars_extreme_event()
.
Create a date_source
object as input for derive_var_extreme_dt()
and
derive_var_extreme_dtm()
.
date_source(dataset_name, filter = NULL, date, set_values_to = NULL)
dataset_name |
The name of the dataset, i.e. a string, used to search for the date. |
filter |
An unquoted condition for filtering |
date |
A variable or an expression providing a date. A date or a datetime can be specified. An unquoted symbol or expression is expected. |
set_values_to |
Variables to be set |
An object of class date_source
.
derive_var_extreme_dtm()
, derive_var_extreme_dt()
Other superseded:
derive_param_extreme_record()
,
derive_var_dthcaus()
,
derive_var_extreme_dt()
,
derive_var_extreme_dtm()
,
dthcaus_source()
,
get_summary_records()
# treatment end date from ADSL
trt_end_date <- date_source(
dataset_name = "adsl",
date = TRTEDT
)
# lab date from LB where assessment was taken, i.e. not "NOT DONE"
lb_date <- date_source(
dataset_name = "lb",
filter = LBSTAT != "NOT DONE" | is.na(LBSTAT),
date = convert_dtc_to_dt(LBDTC)
)
# death date from ADSL including traceability variables
death_date <- date_source(
dataset_name = "adsl",
date = DTHDT,
set_values_to = exprs(
LALVDOM = "ADSL",
LALVVAR = "DTHDT"
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.