likert <- c("Strongly Agree", "Agree", "Neutral",
"Disagree", "Strongly Disagree")
answers <- factor(sample(likert, 15, replace=TRUE), levels=likert)
answers
mergeLevels(answers, Positive=c("Strongly Agree", "Agree"),
Negative=c("Strongly Disagree", "Disagree"))
Run the code above in your browser using DataLab