Created
January 15, 2013 16:47
-
-
Save nassimhaddad/68e808b0cd6ea12286df to your computer and use it in GitHub Desktop.
reorder factor levels, based on : http://stackoverflow.com/q/2375587/1460352
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
df <- data.frame(f = 1:4, g = letters[1:4]) | |
df$g <- factor(df$g, levels = letters[4:1]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment