Created
March 25, 2010 00:06
-
-
Save fonnesbeck/342998 to your computer and use it in GitHub Desktop.
Convert factor levels to numeric in R. Slightly more efficient than "as.numeric(as.character(f))"
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
as.numeric(levels(f))[f] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment