Return to Snippet

Revision: 16367
at August 1, 2009 20:06 by fonnesbeck


Initial Code
as.numeric(levels(f))[f]

Initial URL

                                

Initial Description
Slightly more efficient than "as.numeric(as.character(f))"

Initial Title
Convert Factor Levels to Numeric in R

Initial Tags
convert

Initial Language
R