library(repfun)
fmtlist <- list('SEXS'=list('START'=list('M','F'),
'LABEL'=c('Male','Female')))
adsl <- repfun::adsl
adsl2 <- repfun::ru_fillcodedcode(adsl, codedecodevarpairs=c("SEX", "SEXDCD"),
varcodelistpairs=c("SEX", "SEXS"),
codelistnames=fmtlist)
unique(adsl2[c("SEX","SEXDCD")])
Run the code above in your browser using DataLab