The
dthcaus_source()
function and dthcaus_source()
have been deprecated in favor of
event()
.
dthcaus_source(
dataset_name,
filter,
date,
order = NULL,
mode = "first",
dthcaus,
set_values_to = NULL
)
The name of the dataset, i.e. a string, used to search for the death cause.
none
An expression used for filtering dataset
.
none
A date or datetime variable or an expression to be used for
sorting dataset
.
none
Sort order
Additional variables/expressions to be used for sorting the dataset
. The
dataset is ordered by date
and order
. Can be used to avoid duplicate
record warning.
list of expressions created by exprs()
, e.g.,
exprs(ADT, desc(AVAL))
or NULL
NULL
One of "first"
or "last"
.
Either the "first"
or "last"
observation is preserved from the dataset
which is ordered by date
.
"first"
A variable name, an expression, or a string literal
If a variable name is specified, e.g., AEDECOD
, it is the variable in the
source dataset to be used to assign values to DTHCAUS
; if an expression,
e.g., str_to_upper(AEDECOD)
, it is evaluated in the source dataset and
the results is assigned to DTHCAUS
; if a string literal, e.g. "Adverse Event"
, it is the fixed value to be assigned to DTHCAUS
.
none
Variables to be set to trace the source dataset
NULL
An object of class "dthcaus_source".
Other deprecated:
call_user_fun()
,
date_source()
,
derive_param_extreme_record()
,
derive_var_dthcaus()
,
derive_var_extreme_dt()
,
derive_var_extreme_dtm()
,
get_summary_records()
# Deaths sourced from AE
src_ae <- dthcaus_source(
dataset_name = "ae",
filter = AEOUT == "FATAL",
date = AEDTHDT,
mode = "first",
dthcaus = AEDECOD
)
# Deaths sourced from DS
src_ds <- dthcaus_source(
dataset_name = "ds",
filter = DSDECOD == "DEATH",
date = convert_dtc_to_dt(DSSTDTC),
mode = "first",
dthcaus = DSTERM
)