library(tibble)
adlb <- tribble(
~ATOXDSCL, ~ATOXDSCH, ~ATOXGRL, ~ATOXGRH,
"Hypoglycemia", "Hyperglycemia", NA_character_, "0",
"Hypoglycemia", "Hyperglycemia", "0", "1",
"Hypoglycemia", "Hyperglycemia", "0", "0",
NA_character_, "INR Increased", NA_character_, "0",
"Hypophosphatemia", NA_character_, "1", NA_character_
)
derive_var_atoxgr(adlb)
Run the code above in your browser using DataLab