Run some simple preprocessing of ordered categorical variables, converting ordered levels to integers if necessary, and storing the unique levels of a variable.
orderedCatInitializeAndPreprocess.Rd
Run some simple preprocessing of ordered categorical variables, converting ordered levels to integers if necessary, and storing the unique levels of a variable.
Value
List containing a preprocessed vector of integer-converted ordered categorical observations and the unique level of the original ordered categorical feature.
Examples
x <- c("1. Strongly disagree", "3. Neither agree nor disagree", "2. Disagree", "4. Agree", "3. Neither agree nor disagree", "5. Strongly agree", "4. Agree")
preprocess_list <- orderedCatInitializeAndPreprocess(x)
x_preprocessed <- preprocess_list$x_preprocessed