Convert variables to factors
Function that converts every variable except those specified to factor.
to_factor(data, dic, exclude = NULL)
data
: Dataset containing the REDCap data.dic
: Dataset containing the REDCap dictionary.exclude
: Character vector containing the names of those variables that will not be converted to factors. If NULL
, all variables will be converted.Useful links