Converting a data.frame to a numerical matrix in R, not so easy!
Edit 2019 You don't really need the below. Look at the `model.matrix()` function, which converts data frames into matrices for glmnet and similar function. Original post Sometimes you need to…