[R] (no subject)

Joshua Wiley jwiley.psych at gmail.com
Sat Mar 12 04:12:57 CET 2011


Just as a note, if you are going to convert a factor to numeric, the
preferred idiom is:

## hypothetical numeric factor
x <- factor(paste(10:15))
## preferred method for conversion
as.numeric(levels(x))[x]

Cheers,

Josh



More information about the R-help mailing list