derive_vars_max_flag {admiralvaccine} | R Documentation |
Creating ANLxxFL Variables To Flag The Maximum Records
Description
Adds Flags variables for maximum record per subject per event for overall and per vaccination
Usage
derive_vars_max_flag(dataset, flag1 = "ANL01FL", flag2 = "ANL02FL")
Arguments
dataset |
Input dataset |
flag1 |
Flags the maximum record per subject per event per vaccination. Permitted value: Any variable name as a string or NULL.
|
flag2 |
Flags the maximum record per subject per event for Overall Permitted value: Any variable name as a string or NULL.
|
Details
This utility flags the maximum record per subject per event
per vaccination/Overall
If both parameters flag1
& flag2
are passed as NULL
then
utility will throw error and flags will not be created.
Value
The output dataframe with ANLxxFL
flags
Author(s)
Dhivya Kanagaraj
See Also
Other der_var:
derive_var_aval_adis()
,
derive_vars_crit()
,
derive_vars_event_flag()
,
derive_vars_merged_vaccine()
,
derive_vars_params()
,
derive_vars_vaxdt()
Examples
library(dplyr)
library(admiraldev)
library(admiral)
library(tibble)
input <- tribble(
~USUBJID, ~FAOBJ, ~FATESTCD, ~FATPTREF, ~AVAL, ~FATPT, ~PARAMCD,
"ABC101", "REDNESS", "DIAMETER", "VACC 1", 10, "DAY 1", "DIARE",
"ABC101", "REDNESS", "DIAMETER", "VACC 1", 7, "DAY 2", "DIARE",
"ABC101", "REDNESS", "DIAMETER", "VACC 2", 3, "DAY 1", "DIARE",
"ABC101", "REDNESS", "DIAMETER", "VACC 2", 8, "DAY 2", "DIARE",
"ABC101", "FATIQUE", "SEV", "VACC 1", 1, "DAY 1", "SEVFAT",
"ABC101", "FATIQUE", "SEV", "VACC 1", 1, "DAY 2", "SEVFAT",
"ABC101", "FATIQUE", "SEV", "VACC 2", 2, "DAY 1", "SEVFAT",
"ABC101", "FATIQUE", "SEV", "VACC 2", 3, "DAY 2", "SEVFAT"
)
derive_vars_max_flag(
dataset = input,
flag1 = "ANL01FL",
flag2 = "ANL02FL"
)
derive_vars_max_flag(
dataset = input,
flag1 = NULL,
flag2 = "ANL02FL"
)
derive_vars_max_flag(
dataset = input,
flag1 = "ANL01FL",
flag2 = NULL
)