% Generated by roxygen2: do not edit by hand % Please edit documentation in R/read_redcap_tables.R \name{format_redcap_factor} \alias{format_redcap_factor} \title{Converts REDCap choices to factor levels and stores in labels attribute} \usage{ format_redcap_factor(data, meta) } \arguments{ \item{data}{vector} \item{meta}{vector of REDCap choices} } \value{ vector of class "labelled" with a "labels" attribute } \description{ Applying \link[REDCapCAST]{as_factor} to the data.frame or variable, will coerce to a factor. } \examples{ format_redcap_factor(sample(1:3,20,TRUE),"1, First. | 2, second | 3, THIRD") }