编辑代码

mood <- c("happy","unhappy","unhappy","happy")
factor(mood,
Levels = c("unhappy","happy"),
ordered = FALSE)