The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

Convert-Format-Data-to-Codelist

Vignette Build Datetime

message(paste0('Datetime: ',Sys.Date(),':',Sys.time()))
#> Datetime: 2026-01-21:2026-01-21 09:13:59

Load Libraries

library(repfun)

Invoke Setup Function

tmpdr <- tempdir()
datdir <- file.path(gsub("\\","/",tmpdr,fixed=TRUE),"datdir")
fname <- system.file("formats", "formats.sas7bdat", package = "repfun")
dir.create(datdir,showWarnings=FALSE)
file.copy(from=fname,to=paste0(datdir,'/formats.sas7bdat'))
#> [1] FALSE
repfun::rs_setup(R_RFMTDIR=datdir)

Convert RFMTDIR Format Data Set to List

list <- repfun::ru_data2codelist(repfun:::rfenv$rfmtdata$formats())

Display the Results

message(paste0('First Code Value: ',list$SEXS$START[[1]])) # Code value 1
#> First Code Value: F
message(paste0('First Decode Value: ',list$SEXS$LABEL[[1]])) # Decode value 1
#> First Decode Value: Female
message(paste0('Second Code Value: ',list$SEXS$START[[2]])) # Code value 2
#> Second Code Value: M
message(paste0('Second Decode Value: ',list$SEXS$LABEL[[2]])) # Decode value 2
#> Second Decode Value: Male

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.