title: model.matrix in R
body: <p>there is a data set I am working on which contains only multilevel factors as predictors and a binary response variable. This is currently a data frame. I want to run glmnet on the set so I need to build a model matrix (model.matrix). I read here 
  <a href="https://stackoverflow.com/questions/4560459/all-levels-of-a-factor-in-a-model-matrix-in-r">All Levels of a Factor in a Model Matrix in R</a>
  that a certain level per factor is taken as level. However, I don't know whether this is because in this case there are numerical and factor variables? In any case, can somebody roughly tell me how i would build a model matrix from the <code>mtcars</code> data set from MASS</p>