master
dplyr
sort(x1) ## [1] "F" "M" "R" "S" "T" "U" "W"
proper_order <- x1
cat1 <- factor(x1, levels = proper_order) cat1 ## [1] M T W R F S U ## Levels: M T W R F S U
sort(cat1) ## [1] M T W R F S U ## Levels: M T W R F S U