CRITx
/CRITxFL
pair to BCVA dataset The
derive_var_bcvacritxfl_util()
function has been superseded in favor of admiral::derive_vars_crit_flag()
.
Helper function for derive_var_bcvacritxfl()
that adds a criterion variable CRITx
and
its corresponding flag CRITxFL
to a dataset containing BCVA records
derive_var_bcvacritxfl_util(
dataset,
crit_var,
critx_text,
critxfl_cond,
counter,
bcva_range = NULL,
bcva_uplim = NULL,
bcva_lowlim = NULL
)
The input BCVA dataset with additional columns CRITx
, CRITxFL
.
Input dataset (usually ADBCVA).
Variable with respect to which CRITx
/CRITxFL
are derived
(usually CHG
or AVAL
).
String containing the text for CRITx
variable.
String containing R code detailing the criterion to be satisfied
for CRITxFL
variable to be equal to "Y".
Integer detailing the value of x to use in CRITxFL
.
Numeric vector of length two detailing lower and upper change in
BCVA limits (bcva_range
will be called in critxfl_cond
if the criterion
stipulates that change in BCVA lie inside some range).
Numeric value detailing highest change in BCVA limit (bcva_uplim
will be called in critxfl_cond
if the criterion stipulates that change in BCVA
lie below some upper limit).
Numeric value detailing lowest change in BCVA limit (bcva_lowlim
will be called in critxfl_cond
if the criterion stipulates that change in BCVA
lie above some lower limit).
Edoardo Mancini
The criterion for change in BCVA in CRITxFL
can be of three types: (1) value lies
within some range; a <= crit_var <= b
; (2) value is below some upper limit; crit_var <= a
;
(3) value is above some lower limit; b <= crit_var
. For (1), bcva_range
must
be specified to this function; for (2), bcva_uplim
; for (3) bcva_lowlim
. It is
necessary to supply at least one of these three arguments.
NOTE: if crit_var
is equal to NA, then the resulting criterion flag is also marked
as NA
.