Exercise

# Full matrix encoding

You created a feature that captures the age ranges. You have to numerically encode these features in a way that they can be incorporated into your model. Now, let's assume you are going to work with a linear model that requires a full rank matrix for these one-hot encoded features.

Instructions

**100 XP**

- Use the
`table()`

function to look at the new variable,`quant_q`

. - Use the
`model.matrix()`

function to create a new column for all but one of the categories, which the function will determine for you.