Posted By

fonnesbeck on 08/01/09


Tagged

numeric convert R factor


Versions (?)

Convert Factor Levels to Numeric in R


 / Published in: R
 

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

  1. as.numeric(levels(f))[f]

Report this snippet  

You need to login to post a comment.