library(tibble)
library(dplyr)
library(admiral)
oe <- tribble(
~STUDYID, ~USUBJID, ~OETESTCD, ~OEMETHOD, ~OESTRESN,
"XXX001", "P01", "VACSCORE", "logMAR EYE CHART", 1.08,
"XXX001", "P02", "VACSCORE", "logMAR EYE CHART", 1.66,
"XXX001", "P03", "VACSCORE", "logMAR EYE CHART", 1.60,
"XXX001", "P04", "VACSCORE", "ETDRS EYE CHART", 57,
"XXX001", "P05", "VACSCORE", "ETDRS EYE CHART", 1
)
adbcva <- oe %>%
filter(OETESTCD == "VACSCORE" & toupper(OEMETHOD) == "LOGMAR EYE CHART") %>%
mutate(OESTRESN = convert_logmar_to_etdrs(OESTRESN))
Run the code above in your browser using DataLab