library(tibble)
library(admiral)
adsl <- tribble(
~STUDYID, ~USUBJID,
"XXX001", "P01",
"XXX001", "P02",
"XXX001", "P03",
"XXX001", "P04",
"XXX001", "P05"
)
sc <- tribble(
~STUDYID, ~USUBJID, ~SCTESTCD, ~SCSTRESC,
"XXX001", "P01", "FOCID", "OS",
"XXX001", "P01", "ACOHORT", "COHORT1",
"XXX001", "P02", "FOCID", "OD",
"XXX001", "P02", "ACOHORT", "COHORT3",
"XXX001", "P04", "FOCID", "OU",
"XXX001", "P05", "FOCID", "OD",
"XXX001", "P06", "FOCID", "OS"
)
derive_var_studyeye(adsl, sc)
Run the code above in your browser using DataLab