ae <- tibble::tribble(
~USUBJID, ~AESEQ, ~TEMP_FLAG, ~DCUT_TEMP_REMOVE,
"subject1", 1, "Y", NA,
"subject1", 2, "Y", NA,
"subject1", 3, NA, "Y",
"subject2", 2, "Y", NA,
"subject3", 1, NA, "Y",
"subject4", 1, NA, "Y"
)
drop_temp_vars(dsin = ae) # Drops temp_ and dcut_temp_ variables
drop_temp_vars(dsin = ae, drop_dcut_temp = TRUE) # Drops temp_ and dcut_temp_ variables
drop_temp_vars(dsin = ae, drop_dcut_temp = FALSE) # Drops temp_ variables
Run the code above in your browser using DataLab